Ok. Trying to load a swf and manipulate it’s contents:
public class Main extends MovieClip
{
private var splashScreenStage:SplashScreen;
public function Main():void
{
var request:URLRequest = new URLRequest("assets/splash.swf");
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, splashLoaderComplete);
loader.load(request, context);
}
private function splashLoaderComplete(evt:Event):void{
splashScreenStage = evt.target.content as SplashScreen;
addChild(splashScreenStage);
}
}
But I get a security error. Funny thing though, if I place the swf I want to load (splash.swf) into the root directory, everything loads fine.
So here’s the environment I’m authoring in:
Flash Develop 3 Beta 2
Actionscript Project
compiling with Flex 2.01 SDK
I just don’t understand the sandbox violation stuff. Never delved into it until now. Could someone offer some direction?