From 643ff2e363a0d9bfae90b21a2c1d8f32575de0a9 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Fri, 13 Feb 2015 08:19:07 -0800 Subject: [PATCH] Fix HTML5 asset URL --- templates/haxe/ApplicationMain.hx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/haxe/ApplicationMain.hx b/templates/haxe/ApplicationMain.hx index da23de226..99f2f9f8e 100644 --- a/templates/haxe/ApplicationMain.hx +++ b/templates/haxe/ApplicationMain.hx @@ -22,7 +22,7 @@ class ApplicationMain { preloader.onComplete = start; preloader.create (config); - #if js + #if (js && html5) var urls = []; var types = []; @@ -37,7 +37,15 @@ class ApplicationMain { ::else::types.push (null);::end:: ::end::::end:: - urls = [for (url in urls) Assets.getPath(url)]; + if (config.assetsPrefix != null) { + + for (i in 0...urls.length) { + + urls[i] = config.assetsPrefix + urls[i]; + + } + + } preloader.load (urls, types); #end