The swf loader:
PHP Code:
var new_swf:Loader = new Loader();
var loader:Loader = new Loader();
var loaderInfoStuff:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, cache_load);
loaderInfoStuff.allowCodeImport = true;
function load_init_swf(a){
new_swf.contentLoaderInfo.addEventListener(Event.COMPLETE, init_swf_loaded);
new_swf.load(new URLRequest(a));
}
function init_swf_loaded(e:Event):void{
var myBytes=e.target.bytes;
loader.loadBytes(myBytes, loaderInfoStuff);
new_swf.contentLoaderInfo.removeEventListener(Event.COMPLETE, init_swf_loaded);
}
function cache_load(e:Event):void{
var loaded_mc = e.target.content as MovieClip;
addChild(loaded_mc)
}
load_init_swf("swf_client.swf");
For the child swf just use any stage.addEventlistener functions and they wont run but addEventlistener alone will, I'll treat your paypal to fix this.