CATEGORIES
apple
bike
books
code
editing
frivolity
general
personal
recipes
web

 

flash: loading data from www.domain.com vs domain.com · Jun 2, 02:38 pm

Macromedia Flash Player Settings - Security Warning

every now and then I encounter an issue where I want to load XML, images or other data into a flash movie. loading data works from www.mysite.com, but not from http://mysite.com. if i’m publishing to flash player 7 or 8 there are some security concerns i often forget about:

you may need to create a file called crossdomain.xml and upload it to the root of your server.

<cross-domain-policy> <allow-access-from domain="" /> </cross-domain-policy>

you will want to determine the site you’re trying to access (say – yellowpencil.com) and add that to the parameters if you want to restrict access to the server you are trying to reach (generally a good idea).

<allow-access-from domain="www.yellowpencil.com" secure="false" />

the domain=”www.yellowpencil.com” is where you add your particular domain you’d like to allow, and
secure=”false” states whether it is a secure connection or not.
the easiest way to tell is to look at the http statement (is it http – secure=”false”, or https – secure=”true”)

you’ll also need to add some code in your flash movie.

System.security.allowDomain("yellowpencil.com", "www.yellowpencil.com");

see the help files in flash for more information about System.security.allowDomain.

this code in an XML file and your flash movie should prevent any users from seeing a popup box in their flash warning about security risks.

macrodobe has a ton of great reading and examples here

Categories: web / code  |   
Tags: code, flash

* * * * * *

 

  1. I prefer your bread enteries…but I am glad you are writing this for your other audience


    Karen    Jun 3, 07:34 pm    #
  2. I am his other audience and I too prefer the bread entries.
    That and baby pictures!
    WOOHOO!


    BrockSky    Jun 7, 02:44 pm    #
Name
Email
http://
Message
  Textile Help