# Quick Question -- Targeting MCs

**URL:** https://forum.kirupa.com/t/quick-question-targeting-mcs/113412
**Category:** Uncategorized
**Created:** [June 17, 2004, 5:02pm UTC](https://forum.kirupa.com/t/quick-question-targeting-mcs/113412 "2004-06-17T17:02:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![th3Phallex](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@th3Phallex](https://forum.kirupa.com/u/th3Phallex)
#### Post date: [June 17, 2004, 5:02pm UTC](https://forum.kirupa.com/t/quick-question-targeting-mcs/113412/1 "2004-06-17T17:02:00Z")

</div>

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:

```auto

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

```auto
_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!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2004, 5:09pm UTC](https://forum.kirupa.com/t/quick-question-targeting-mcs/113412/2 "2004-06-17T17:09:21Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2004, 5:15pm UTC](https://forum.kirupa.com/t/quick-question-targeting-mcs/113412/3 "2004-06-17T17:15:00Z")

</div>

> [@claudio](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2004, 6:19pm UTC](https://forum.kirupa.com/t/quick-question-targeting-mcs/113412/4 "2004-06-17T18:19:59Z")

</div>

I got it to work.

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

```auto

done = false;

```

on the 11th frame, I have these actions:

```auto

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

```

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

```auto

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”.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2004, 6:23pm UTC](https://forum.kirupa.com/t/quick-question-targeting-mcs/113412/5 "2004-06-17T18:23:56Z")

</div>

It should be:

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

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2004, 6:26pm UTC](https://forum.kirupa.com/t/quick-question-targeting-mcs/113412/6 "2004-06-17T18:26:38Z")

</div>

> [@claudio](#):
>
> It should be:
> 
> ```auto
> 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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 17, 2004, 6:29pm UTC](https://forum.kirupa.com/t/quick-question-targeting-mcs/113412/7 "2004-06-17T18:29:33Z")

</div>

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

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