Solved

AS3 loading PHP generated XML not working on-line

Posted on 2011-02-18
2
734 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Open Source MP4 Flash Player 2 203
Adobe flash player memory exhaustion 6 102
Shouldn't i be able to use an old win xp machine as an internet radio? 7 142
flash professional 3 43
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses

732 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