It appears that Adobe closed some major security concerns with Flash Player 10.0.42.34 see here, however I believe these security concerns have changed the ability to access swf when setting Security.allowDomain.
ASDOC says:
“If two SWF files are served from different domains — for example, http://siteA.com/swfA.swf and http://siteB.com/siteB.swf — then, by default, Flash Player does not allow swfA.swf to script swfB.swf, nor swfB.swf to script swfA.swf. A SWF file gives SWF files from other domains by calling Security.allowDomain(). This is called cross-domain scripting. By calling Security.allowDomain(”siteA.com”), siteB.swf gives siteA.swf permission to script it.” > see here.
In the example below I am creating the example ASDOC is describing. I will create two application which will be hosted on two separate domain names, however I am unable to change properties in the accessed application, see detail below:
Accessed application will holds a label and set the Security.allowDomain to wild card (*) so any application should be able to load this swf and change properties. See below:
<Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024" minHeight="768" preinitialize="application1_initializeHandler(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function application1_initializeHandler(event:FlexEvent):void
{
Security.allowDomain("*");
}
]]>
</fx:Script>
<Label id="label" text="Hello from accessed application!" x="8" y="9"/>
</s:Application>
The second application (accessing application) will be hosted on a separate domain and load the accessed swf and change the label property:
<Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024" minHeight="768"
initialize="initializeHandler()">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
// define variables
private var loader:Loader;
private var content:*;
// load swf
private function initializeHandler():void
{
loader = new Loader();
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadContent_onComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(new URLRequest("http://zeen.com/temp/bin-debug/AccessedApplication.swf"));
component.addChild(loader);
}
// Event Handler
private function loadContent_onComplete(event:Event):void
{
content = event.target.content;
var onContentApplicationComplete:Function = function(event:Event):void
{
// content loaded successfully
}
content.addEventListener(FlexEvent.APPLICATION_COMPLETE, onContentApplicationComplete);
}
private function ioErrorHandler(event:IOErrorEvent):void
{
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
Alert.show(event.text);
}
private function securityErrorHandler(event:SecurityErrorEvent):void
{
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
Alert.show(event.text);
}
// methods to access loaded swf
private function callAccessedApplication():void
{
this.content.document.label.text = "label change!";
}
]]>
</fx:Script>
<mx:UIComponent id="component" width="400" height="82" x="11" y="43" />
<Button label="Call accessed application"
click="callAccessedApplication()" x="84" y="0"/>
</s:Application>
I also have set the cross-domain policy on the accessed applciation server to allow access:
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="*"/> </cross-domain-policy>
The swf is loaded successfully, but with a warning alert. Additionally, I am unable to change the label properties on the accessed application, see screen shot below:

The application is hosted here:
http://eladelrom.com/bin-debug/AccessingApplication.html
I am hoping to get a clarification: https://bugs.adobe.com/jira/browse/FP-3513






















Strange, I don’t encounter any error for IE6 and Firefox 3.5 when testing your application.
A wildcard is not recommended.
Are you using the Flash Player debugger? Once you click the button you should see the label change, that’s not happening using Flash player version newer than 10.0.42.34.
If this is true it’s gonna break a lot of deployed applications, but, I get the error (#2121: Security sandbox violation) with player 10,0,32,18 debug.
I found same error on other versions of Flash Player 10 as well. It seems to me that many people will complain, not sure why I am the first one to put a blog post. When I run the accessed application on Flash Builder it works fine and I can adjust the label property, however hosting it on a separate domain doesn’t work as expected.