?
Solved

AS3 loading PHP generated XML not working on-line

Posted on 2011-02-18
2
Medium Priority
?
746 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 2000 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

Independent Software Vendors: 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

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…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
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…
Suggested Courses

752 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