SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AS3 remote XML slideshow

    I have a slide show that works as long as the XML file is on the same server as the swf. I need the XML to reside on a separate server. This fla file works on my local machine, but once uploaded, all the xml elements in the movie never load.

    Doesn't work:
    Code:
    // url to slideshow xml
    var strXMLPath:String = "http://xxx.com/test/images.xml";
    Works:
    Code:
    // url to slideshow xml
    var strXMLPath:String = "images.xml";
    Is it the way I define the path, some security thing... ?

    The server the xml is on allows the flash server to access xml news feeds from it so i don;t think it is a server side thing.

    Thanks for any help,
    Robert

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could it have something to do with this?

    Code:
    	// load xml file
    	xmlLoader.load(new URLRequest(strXMLPath));

  3. #3
    SitePoint Evangelist ferrari_chris's Avatar
    Join Date
    Mar 2008
    Location
    NP, New Zealand
    Posts
    576
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think Flash can get upset when trying to access information across domains. I'm not 100% on how it all works, but you might to want look into the security settings of the Flash player and stuff like that.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2008
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks.

    I added a crossdomain.xml to the server with the XML and now text will come through, but no images.

    crossdomain.xml
    <cross-domain-policy>
    <allow-access-from domain="*" />
    </cross-domain-policy>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •