0

I'm creating a flash game that includes two characters. One that is dynamically loaded from a url and the other that's already present on stage. Both characters load up just fine when testing within flash professional but when testing on a browser or opening the swf file itself, neither character loads.

I've already set my playback security settings to "network access only" as suggested in this question: Flash not working in browser but works fine on computer and it still isn't working.

Both images are strips that show the complete character's animation in one picture itself and through the use of masks and code, I'm able to depict each frame of animation.

Here's the file itself if you need to check it out for yourself.

swf file here

Community
  • 1
  • 1
  • 1
    Have you checked to see if the request is being made and failing? If you're in chrome, you can open up Javascript Console and look at the Network tab to see the status of any requests from your page. – Casey Rule Nov 11 '14 at 12:22
  • 1
    I've tried to launch that via SWF player debugger, and it reported a security error: "SecurityError: Error #2122: Security sandbox violation: LoaderInfo.content: file:///.../Marshall.swf cannot access http://a2.cdn.gaiaonline.com/dress-up/avatar/ava/fa/ee/1e707d8e127eefa_strip.png. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded." You might have to fix this one, and check again. – Vesper Nov 11 '14 at 13:14
  • @Casey Rule I checked the console and the status returned was 200 okay but still nothing. – Nishanth Premraj Nov 11 '14 at 14:04
  • @Vesper That sounds like a possible reason. The image doesn't belong to me myself and is hosted elsewhere which is why the security measures in place doesn't allow me to access it? But that doesn't explain why the image that is within my flash file(marshall1, marshall2) doesn't display either. – Nishanth Premraj Nov 11 '14 at 14:07
  • This depends on what happens first, either loading an external image or creating the internal, in this case an uncaught exception can prevent the SWF from creating internal display object. – Vesper Nov 11 '14 at 14:21
  • @Vesper Well. I saved the image from the link in my local folder as avatar.png and changed its associated url request to reflect it and it still doesnt diaplay in a browser. – Nishanth Premraj Nov 11 '14 at 14:29
  • asked a million times and the answer is always wrong path. – BotMaster Nov 11 '14 at 14:31
  • @BotMaster Care to elaborate? As in how to fix it? – Nishanth Premraj Nov 11 '14 at 14:45
  • Sure enough, you can't load "file://" links via URLRequest. You might want to set up Apache/IIS for this purpose, and test in local browser session without uploading and cross-domain issues. – Vesper Nov 11 '14 at 14:49
  • You fix a path problem by giving the right path, there's not much to elaborate. – BotMaster Nov 11 '14 at 15:31
  • @Vesper. I think we're getting a little off-topic here. what I wanted to do was load a url image and now it seems that I cannot because the image is protected somehow.Can you perhaps explain to me why it works within the editor but not outside of it? i.e How does the security come into effect only when running it in a browser and flash player? – Nishanth Premraj Nov 12 '14 at 03:59
  • I guess it's not offtopic, because security restrictions are something that comes into effect depending on environment the SWF is run, so you have to work around security restrictions. Most likely you need to call [`Security.allowDomain("*")`](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Security.html#allowDomain()) prior to loading the external asset. I am not familiar with security yet, as all my resources reside within the SWF. – Vesper Nov 12 '14 at 06:04
  • @Vesper I'm not familiar with its usage either but thanks for helping anyway. – Nishanth Premraj Nov 13 '14 at 11:29

0 Answers0