Solved

AS3 loading PHP generated XML not working on-line

Posted on 2011-02-18
2
696 Views
Last Modified: 2012-05-11
Hi,

I have an AS3 game that is loading a php generated xml file.  The path used for PHP file is absolute.  When I run the application locally, the xml file loads, but on-line nothing happens.  The file doesn't load and no IO errors are reported.  I tested the IO reporting funtion locally by changing the path name and it reported the errors.  

The PHP generated XML file that I am accessing is on another server.

I was able to get the application working on-line by copying the xml data to a new xml file, placing that on my server and accessing it from that location.  This of course is not a solution as the PHP generated XML reflects the current information stored in a database.

Any help would be appreciated.

Best regards,


Chris McLaughlin
0
Comment
Question by:medxmedia
2 Comments
 
LVL 4

Accepted Solution

by:
LAMASE earned 500 total points
Comment Utility
This is a cross domain restriction for Flash. You cannot retrieve data from a different domain, and no error messages are displayed.
http://kb2.adobe.com/cps/142/tn_14213.html#main_load

However if you own the other server, you can create a crossdomain.xml file to allow the inclusion. For a complete reference look here
http://kb2.adobe.com/cps/142/tn_14213.html#main_main_policy

If you can't create the crossdomain.xml, you have a last chance: create a script (ie, php, asp, ruby..) on your domain that reads the xml file on the other server (no limitations doing this) and outputs without modification.
In this way you can call an "xml" located in your domain that actually resides on an external domain.
0
 

Author Comment

by:medxmedia
Comment Utility
Hi Lamase,

Thanks for the info.  I thougth it had something to do with that.  I believe that I was able to get data from another server using the POST mehtod, but I'm guessing this is different.

As the game will live on the other server, putting it on the server, would solve the problem-- yes?

Thanks again,


Chris
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now