Trying to recreate loadmovie with As3……addchild problems.

By dtrace | Jul 4, 2009

actionscript3

I want to load in external swfs into an mc on the root called ‘holder’.

In As2, I would just do loadMovie("whatever.swf", this.holder);

And if I loaded another swf into that same holder it would replace the contents with the new swf.

But now, I’m trying As3 and doing…
var i =new Loader();
i.load(new URLRequest("contact.swf"));
this.holder.addChild(i)

When I repeat this code, for another external swf, I want it to replace the first one, but it appears to not be doing that. I fear that this addChild, is simply adding more mc’s within my main holder mc.

So I don’t know how to match the functionality that I liked from As2. Help?

actionscript3

Please reply at our Forum

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

© 2007 ActionScript 3.0