A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [F9] crossdomain or what?

  1. #1
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625

    [F9] crossdomain or what?

    Given that this works perfectly with Firefox 2.0/WindowsXP..

    I have the following architecture loading an xml feed:


    TOP DOCUMENT: a Facebook page, with my application in the Canvas featuring an iFrame.

    BOTTOM DOCUMENT: a simple XHTML page with the official JS embedder for Flash media.

    FLASH: an AS3 movie, that loads data from a PHP script on the same domain.



    I have put a crossdomain.xml policy file on my server, allowing access from Facebook. I have set allowScriptAccess to always.
    The freaking thing just doesn't work in IE or Safari.

    What happens:
    the server returns STATUS 200, but nothing is returned to the Flash movie.
    It's just like the PHP script didn't output anything at all.

    No errors are thrown, no IOError, no other status code. Nothing.

    If I open the BOTTOM DOCUMENT directly, in a new page, everything works perfectly in any browser, so I guess this has to do with the document being framed in a document from another domain.

    Is there any way to work around it?

    All this security crap is just a pain in the neck. It makes me loose thousands of bucks every year in time waisted.
    Altruism does not exist. Sustainability must be made profitable.

  2. #2
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    I've changed the configuration slightly:

    ONLY DOCUMENT: a Facebook page, with my app in the Canvas, which loads the Flash directly.

    The problem is EXACTLY the same as before.

    The HTTP_STATUS returned is sometimes 0, sometimes 200.
    In IE and Safari, if I open the feed directly in another window of the browser, then everything works great. What the hell!!!!
    Altruism does not exist. Sustainability must be made profitable.

  3. #3
    Junior Member
    Join Date
    Sep 2007
    Posts
    1
    I'm having a similar problem with the whole crossdomain.xml security process within Flash 9. I'm trying to load facebook photo URLs from within Flash and I'm getting security errors when trying to do this because I'm modifying the bitmap data of these images. I notice there are in fact crossdomain.xml files on each of the photo servers, for example:

    http://photos-b.ak.facebook.com/crossdomain.xml

    Do these crossdomain.xml files give ME access to the photos? Do I now have to give Facebook access to my Flash app by creating my own crossdomain.xml like you said in your post?

    How did you solve this issue? Thanks!

  4. #4
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi whather,

    Welcome to FlashKit.

    No, that cross domain policy file does not give you access to the photos, unless you're calling them from facebook.com or one of its subdomains, i.e., unless your .swf is hosted there.

    If your .swf is hosted at yourdomain.com, the xml file would have to have it too.
    Code:
    <cross-domain-policy>
     <allow-access-from domain="facebook.com"/>
     <allow-access-from domain="*.facebook.com"/>
     <allow-access-from domain="*.yourdomain.com"/>
    </cross-domain-policy>
    Tipically, youd have this xml file:
    Code:
    <cross-domain-policy>
     <allow-access-from domain="*"/>
    </cross-domain-policy>
    that would allow access from any domain.

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