URL opening error in Flash CS4

2.3k views Asked by At

I have a script that loads a php page for variables. There are no problems when the swf is uploaded to the site but when I run it locally, I keep getting "Error opening URL" messages. I'm using absolute pathing and if I paste the URL my script is using in a browser, the correct page opens. This only started happening after the site changed servers. Any ideas what the problem could be? Thanks.

3

There are 3 answers

1
Nick On

Crossdomains.xml file possibly?

0
zechdc On

The "Error opening URL" seems to be caused by a number of issues. I have tried to keep track of all the different solutions I have used in the past to fix the problem. Ever time I encounter the "Error opening URL" the solution is different. Hopefully one of these solutions helps you.

I usually find the following solutions on google. - Make sure crossdomain policy is setup correctly. - Set a bunch of variables like Security.allowDomain(domainHERE) - Change publishing setting for your flash file. - Make sure your connecting to the right url.

Here is what works for me... usually.


1) Make sure you are connecting to the right URL. Use the full path, don't use relative links. Also, copy and paste the url in your web browser to see if it connects.

You can also use flash.events.HTTPStatusEvent.HTTP_STATUS to view the HTTP headers but I would recommend you check out solution 5 first. Its a much easier way with more details.

Source: http://www.judahfrangipane.com/blog/2007/02/15/error-2032-stream-error/


2) Put a crossdomain.xml file in the root of your server (usually public_html or www)

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>
    <allow-access-from domain="*"/>
</cross-domain-policy>

Source: http://www.senocular.com/pub/adobe/crossdomain/policyfiles.html


3) While editing the flash file, press Ctrl + Shift + F12

Make sure Local playback security is set to Access Network Only.


4) If you are hosting locally using MAMP, WAMP, XAMP or something similar, skip this step. Otherwise, Call your webhost and yell at them ;)

I have hosted with godaddy, hostgator and liquidweb. It seems that all of them have some kind of firewall setup blocking flash from accessing the files you want it to.

Give your host a call, tell them your problem and ask them to whitelist the files you are trying to connect to and you should be good to go.

Remember, everytime you want to connect to a new file, it has to be whitelisted. I always forget this and it takes me 3 hours to figure out why changing the name of my file or moving it messes everything up. :)


5) Use Charles Web Debugging Proxy Program to gather some important information.

I will break this down into a few steps.

Usually for me the "Error opening URL" is due to a coding problem on the site I'm trying to connect to.

  1. Open Charles
  2. Run your flash file
  3. Select the site your flash file tried to connect to in Charles side bar.
  4. View the Response tab near the top.
  5. On the Response tab you should see a few other tabs near the bottom. View the Headers tab.

    • See what HTTP_Status was returned. Then look search this page to see what that status code means. It will give a somewhat broad definition but it still helps narrow things down.
    • 500 Means a problem with your server... If your server is running fine, then its most likely a code problem.
  6. Then view the Text tab near the bottom of the Response tab. This will show you exactly what that webpage looks like to flash. If your server is in some kind of debug mode where it displays errors, this is where you will see them.

Well I hope this helps someone. I will try to continue to update it with more issues and solutions I run into. This is probably the number one problem I run into with flash. Super annoying!

0
dsdsdsdsd On

not really a solution, but a work-around:

before CTRL-ENTER on your .fla, do a CTRL-S

this seems to work about 90% of the time for me


NOTE: I never had this problem until one random day about 6 months ago. Now it plagues most of my old projects, cs4 or cs6.