Hi I’m new to adobe flash/flex so please forgive me if my question isn’t too clear. I’m developing a website with a flash object that dynamically generates its content and I want the flash object itself to be embeddable into other website like how youtube does it. I have no clue how to approach this and any help would be really appreciated.
Share
You need two things:
1) Distribute the url or embed code for your swf online somewhere (like done in youtube). You get the code by publishing your flash object and then copy paste the html embed tags.
2) If you’re dynamically loading stuff into the flash object you will need to allow data loads from all hosts. Lets say that you have a source file at
www.domain.comthat the flash object loads. Some one takes the Flash application and puts it on their site atwww.otherdomain.com. This application then tries to do a cross domain data loadwww.otherdomain.com <- www.domain.com. That will fail unless you have you explicitly allow cross domain loads forwww.domain.com. You do this by adding a crossdomain.xml file to your websites root or preferably the folder where the source file is kept. If you put in the webroot then all content hosted there will be available to load from anywhere. The xml file should contain all the domain that are allowed to load anything from your domain (in this case it should just contain a * to allow any domain to load from your domain).Here’s a basic example that allows any domain to load data
More info on that (http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html)