tehhparadox
08-11-2009, 10:49 AM
Hi guys, I've been trying to load a swf movie from another using actionscript 3.0 and I'm failing... This is the code I used:
stage.addEventListener(Event.ENTER_FRAME, onEnter);
function onEnter(event:Event):void {
var loadSite = new Loader();
loadSite.unload();
loadSite.load(new URLRequest("photoGallery.swf"));
MovieClip(root).addChild(loadSite);
removeEventListener(Event.ENTER_FRAME, onEnter);
}
When I run this movie, it does load photoGallery.swf. However, it goes all strange and photoGalley.swf does not run properly at all. Could anyone help?
stage.addEventListener(Event.ENTER_FRAME, onEnter);
function onEnter(event:Event):void {
var loadSite = new Loader();
loadSite.unload();
loadSite.load(new URLRequest("photoGallery.swf"));
MovieClip(root).addChild(loadSite);
removeEventListener(Event.ENTER_FRAME, onEnter);
}
When I run this movie, it does load photoGallery.swf. However, it goes all strange and photoGalley.swf does not run properly at all. Could anyone help?