Solved

AS3 loading PHP generated XML not working on-line

Posted on 2011-02-18
2
742 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
LAMASE earned 500 total points
ID: 34930638
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
ID: 34930846
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

726 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