dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: loading from different server

  1. #1
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194

    loading from different server

    Hi

    I've had a search on here for info on this but couldn't find any.

    What are the issues with dynamically loading either an image (.png/jpg/gif), data (XML or raw) or a .swf from a different server to the one that the loader .swf is on?

    Is there a straightforward no hassle way of that working? or does it always require a cross domain file? will it always show a popup for people? etc etc? basically what I'm after is a way to either load a .swf from one server into a .swf on another server, or at least an image with an associated bit of data (to provide a URL link for the image) without any need for a cross domain file or any weird security pop ups appearing, can it be done?
    FlashGameMaker.com - er..where I say stuff.

  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    a cross domain policy file is straight forward for anybody that is dealing with a webserver.....my aplogies if this post is brutally honest.
    ~calmchess~

  3. #3
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    ah, but I won't know where the loader .swf will end up, or is that not an issue? in other words I can point the loader .swf to my cross domain file (which will be on my server so I'll know where that is! ) regardless of where the loader .swf will reside?
    FlashGameMaker.com - er..where I say stuff.

  4. #4
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    ok I've been reading about the cross domain file, and I just want to get this straight.

    I have .swf A and .swf B. I want .swf B to load into .swf A. Swf A goes off into the internet and ends up on some server somewhere (which I have no idea where that is). .Swf B is on my own server. Swf A tries to load .swf b into it by accessing a cross domain file which is residing on my own server, correct so far? so the cross domain file is on my own server NOT the server .swf A is on. And in the cross domain file I need to set it up so it can be accessed by any server correct? (I think by using *)
    FlashGameMaker.com - er..where I say stuff.

  5. #5
    Senior Member inder_s2010's Avatar
    Join Date
    Apr 2004
    Location
    don't no
    Posts
    198
    You have to allow by policy file or by allowDomain command on both sides where your files are placed. Try it out, i think it will work
    inder

  6. #6
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    ok, but I just need whatever server swf A is on to be able to load in swf B from my own server, I'm hoping that I can use a cross domain file on my own server allowing wildcard access. I can't have anything on the server that swf A is on because I don't know where that will be! only the .swf A will be on that.......does all that sound right? or do I need a cross domain file on the server that swf A will be on?
    FlashGameMaker.com - er..where I say stuff.

  7. #7
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    have I posted this in the wrong section?
    FlashGameMaker.com - er..where I say stuff.

  8. #8
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    put a cross domain policy file crossdomain.xml with a wild card on the root of your server:

    PHP Code:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy 
      SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
      <allow-access-from domain="*" />
    </cross-domain-policy>
    you can fidn more details: http://www.moock.org/asdg/technotes/...inPolicyFiles/
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center