Solved

AS3 loading PHP generated XML not working on-line

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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Reduce the size of the Flash SWF file it executes 12 424
anti-download video publishing site? 6 621
High Internet Explorer CPU on Flash site in Citrix 2 868
File conversion question 5 131
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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…

740 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