PDA

View Full Version : Loading a swf movie from another


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?

tehhparadox
08-11-2009, 10:54 AM
Also, what I've been trying to do with this was to make a login page as one swf and redirect if the password is correct to another swf. Can't I do this loading movie? And I want this to on one page on the web.

dplows
08-11-2009, 01:55 PM
I'd recommend using AS2.

loadMovie() never fails.

tehhparadox
08-11-2009, 02:22 PM
I'd recommend using AS2.

loadMovie() never fails.

But can you load a movie that was made with AS3 with AS2?