I want to use an swf file as the source to an mx:Image which I then want to drag around.
The swf file is in the applicationStorageDirectory.
The swf file loads and appears on the screen. I click on the image and get:
*** Security Sandbox Violation ***
SecurityDomain 'app-storage:/project1/images/bg.swf' tried to access incompatible context 'app:/RAE.swf'
How do I solve this?
It seems that even if an swf file has no scripts in it, if any of the assets have been turned into movieClips (we're talking Flash here), then as soon as you click on them they try to reference the parent swf. The Air app interprets this as an external swf trying to script it and the Sandbox violation occurs.
The solution to this specific problem is to put the mx:Image inside an mx:Canvas and set the mouseChildren property of the Canvas to false.