views:

398

answers:

3

Hi, I'm just wondering if anybody can help me with my simple but frustrating problem.

I have created an SWF that loads an XML file from http://localhost/flash/Projects/MEL/Quiz/Quiz/bin/xml/quiz.xml, but I get this error when running the movie using Test Movie in the Flash IDE.

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://localhost/flash/Projects/MEL/Quiz/Quiz/bin/xml/quiz.xml
    at Main/loadConfig()[D:\www\webroot\flash\Projects\MEL\Quiz\Quiz\src\Main.as:126]
    at Main/configLoadError()[D:\www\webroot\flash\Projects\MEL\Quiz\Quiz\src\Main.as:143]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

The error I get if I handle the exception is:

[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost/flash/Projects/MEL/Quiz/Quiz/bin/xml/quiz.xml"]

Trouble is running the SWF in a browser locally does work, it only throws these errors in the Flash IDE.

I have tried a adding wildcard crossdomain.xml file in my root web directory and setting the SWF publish properties for local playback security to Allow network only, but neither of these have solved my problem.

I know Windows 7 handles localhost name resolution differently compared to previous versions of Windows but I have even added 127.0.0.1 localhost to my hosts file to no avail.

Can anyone shed any light on this issue?

A: 

Try to use a relative path to the file. Should work on both scenarios, flash IDE and browser.

dome
Sorry I should have mentioned in my original question that I used to use relative paths, which work fine. However I have had to switch it to absolute paths due to the XML being generated via PHP.Using a relative path in the Flash IDE to a dynamic PHP file just loads the PHP code and not the parsed XML results that I require.Thanks anyway.
davgothic
A: 

Hi guys,

I've finally solved my problem, and now I feel stupid.

For some reason Comodo Firewall was blocking the Flash IDE on any IP and any port. The firewall usually asks me to allow or deny a connection, however in this case it didn't so I never gave the firewall a thought.

Thanks for all your help!

davgothic
A: 

I had the same problem and my firewall was not prompting me to allow/deny connection. I changed my firewall settings and it worked fine. Thanks a lot

sameer