flash - Why are my external resources not being loaded (in many cases) via URL/Loaders in ActionScript? -


i developing flash game, loads resources local url. url resolved locally , http://example.dev. holds static resources, http://example.dev/images/randomtiles/grass.png is, actually, valid image if hit resource via curl.

however, i'm using 2 browsers test. 1 google chrome adobe flash player 15.0.0.189, , 1 firefox adobe flash player 11.2.202.457. i'm using ubuntu 14.04 (perhaps bug , not 8-layer issue).

in afp 15, hitting url http://example.dev/images/randomtiles/grass.png not work @ all. in afp 11, hitting url http://example.dev/images/randomtiles/grass.png works if connected internet. hitting url curl works always. hitting url chrome or firefox directly, works always.

the mechanism used hit images via flash bit long explain, based in loaders:

var loader:loader = new loader(); loader.contentloaderinfo.addeventlistener(event.complete, function(e:event):void {     try {         addcachecallback(entry, bitmap(loaderinfo(e.target).content));     } catch(e:error) {         errorcallback(e);     } }); loader.contentloaderinfo.addeventlistener(ioerrorevent.io_error, errorcallback); loader.load(new urlrequest("http://example.dev/images/randomtiles/grass.png")); 

what expect: since resources server maintained locally (in machine), expect resources always served in game, regardless flash version.

what's going on flash player? or... did miss there? (cannot debug due problems environment i'm still struggling with).

is .swf file served same domain?

if not have add crossdomain.xml file site. this documentation may help.

the easiest way test whether problem you're experiencing add file named crossdomain.xml site root:

<?xml version="1.0"?>   <!-- http://www.foo.com/crossdomain.xml -->   <cross-domain-policy>     <allow-access-from domain="*" />   </cross-domain-policy>

note in practice, want whitelist domains should permitted access.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -