Flash/Flex Security and using the api

farbodrfarbodr Registered Users Posts: 7 Beginner grinner
I'm experienceing sandbox error in my flex app. I get this error when I try to access api.smugmug.com. According to flash seurity a flash app can only access resources from the domain it originates from unless you have the crossdomain.xml file in the web root. Obviously I can't put this in the root of smugmug.com. So how do I work around this problem?

Thx,

Fred

Comments

  • flyingdutchieflyingdutchie Registered Users Posts: 1,286 Major grins
    edited September 24, 2008
    I'm no flash/flex expert at all, but i did a quick Google and came up with this page:
    http://www.adobe.com/devnet/flex/quickstart/httpservice/

    ... and found this quote there:
    Note: Although you can load data into your application from other domains, these other domains must implement an open crossdomain.xml file or add the domain that your SWF file is loaded from to their crossdomain.xml file. For more information on crossdomain.xml files, see Building and Deploying Flex 3 Applications.
    I can't grasp the notion of time.

    When I hear the earth will melt into the sun,
    in two billion years,
    all I can think is:
        "Will that be on a Monday?"
    ==========================
    http://www.streetsofboston.com
    http://blog.antonspaans.com
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited September 24, 2008
    G'day Fred,

    Our api.smugmug.com endpoint has a crossdomain.xml file. If you are using APi versions 1.2.1 or 1.2.2, there is a Sandboxed parameter that can be sent for methods that return image urls. Sending this parameter will return image urls referencing api.smugmug.com insetad of nickname.smugmug.com.

    Let me know if you need more information.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • farbodrfarbodr Registered Users Posts: 7 Beginner grinner
    edited September 25, 2008
    devbobo wrote:
    G'day Fred,

    Our api.smugmug.com endpoint has a crossdomain.xml file. If you are using APi versions 1.2.1 or 1.2.2, there is a Sandboxed parameter that can be sent for methods that return image urls. Sending this parameter will return image urls referencing api.smugmug.com insetad of nickname.smugmug.com.

    Let me know if you need more information.

    Cheers,

    David

    Hi David,

    This is great. I was hoping you would have the crossdomain.xml in the root. Now I need to find out why I'm getting that sandbox error since the file is there :)

    Thx,

    Fred R.
  • blackshirtblackshirt Registered Users Posts: 4 Beginner grinner
    edited December 3, 2008
    Blank, White Images
    I am using PHPSmug in conjunction with Flash to create my own custom portfolio for a client. PHPSmug is used to return XML Data that the Flash then parses. It works locally in the Dev environment flawlessly. When uploaded to the site my Flash application turns up all white images, I tested this by trying to loadClip other images from various servers, non-Smugmug, and the same occured. This is some sort of Security issue in place by Flash. But with other Flash Applications for Flickr as well as NASMU there must be some way around this.

    will the sandboxed parameter help me in this matter. I've tried manually placing http://api.smugmug.com/photos/*.jpg into the XML and it still returned a White Image. I know that you have a Cross-Domain XML Policy file there and have seen it so this makes me think your sandboxed parameter might not be helpful. I would like to give it a shot if you're willing to help.

    Any other suggestions would be good too. Thanks.
    devbobo wrote:
    G'day Fred,

    Our api.smugmug.com endpoint has a crossdomain.xml file. If you are using APi versions 1.2.1 or 1.2.2, there is a Sandboxed parameter that can be sent for methods that return image urls. Sending this parameter will return image urls referencing api.smugmug.com insetad of nickname.smugmug.com.

    Let me know if you need more information.

    Cheers,

    David
  • beacazilbeacazil Registered Users Posts: 25 Big grins
    edited December 8, 2008
    blackshirt wrote:
    ...Any other suggestions would be good too. Thanks.
    See my comment in the other thread: http://www.dgrin.com/showpost.php?p=980898&postcount=2

    Jürgen
Sign In or Register to comment.