Quick Question -- Targeting MCs

I have a movie clip on the root stage.

It’s instance name is “introMC”.

Inside the “introMC”, I have another MovieClip that I am resizing with Actionscript:


onClipEvent (load) {
 XScaleDest = 2000;
 YScaleDest = 700;
}
onClipEvent (enterFrame) {
 if (this._xscale != XScaleDest) {
  this._xscale += (XScaleDest-this._xscale)*.1;
 }
 if (this._yscale != YScaleDest) {
  this._yscale += (YScaleDest-this._yscale)*.1;
 }
 if (this._xscale >= (XScaleDest-10)) {
  this._xscale = XScaleDest;
  this._yscale = YScaleDest;
  //_root.introMC.gotoAndStop("doneFrame");
 }
}


As you can see by the commented line (//…), when the MC is done resizing, I want the “introMC” MovieClip to gotoAndPlay the frame called “doneFrame”…

But the

_root.introMC.gotoAndStop("doneFrame");

command doesn’t work. It just keeps re-doing the resize animation.

I know I’m forgetting something. Can anyone help me out here?

Thanks!!

Did you give an instance name to the introMC?
You could simnply use _parent.gotoAndStop(“doneFrame”)

Yes, please read what I posted above.
I DID SAY that I gave my MC an instance name of “introMC”.

And yes, I did try that (_parent.gotoAndPlay), and it doesn’t work. It still seems to repeat the resizing animation, starting from _xscale and _yscale = 0 – when it’s done resizing, the _xscale is 2000 and _yscale is 700. It keeps repeating this over and over again. If I take out the (gotoAndPlay) stuff, it stops resizing just fine, and I can even trace stuff to the outuput panel.

I think I’m just targeting it wrong.

PLEASE HELP!!

Thanks.

I got it to work.

What I did was:
In my “introMC” MovieClip, in the first frame, I have this code:


done = false;

on the 11th frame, I have these actions:


if (done == true){
gotoAndPlay("doneFrame");
}
else{
gotoAndPlay(10);
}

then, once my “boxMC” is done resizing, in it’s (onClipEvent) actions, I have:


done = true;

So, in my if statement, it checks if the “done” variable is true or false. Once it’s true, it will finish the loop and go to the “doneFrame”.

It should be:

if (done **==** true){
gotoAndPlay("doneFrame");
}

Yeah, sorry, I posted it wrong, but I coded it correctly in the movie.

It has been edited, although I am going to delete this thread.

I wouldn’t delete it - someone else might learn from it!

p.s. I like your footer! :thumb: