# Help targeting movie clips

**URL:** <https://forum.kirupa.com/t/help-targeting-movie-clips/7779>\
**Category:** flash\
**Created:** [November 7, 2002, 3:34pm UTC](https://forum.kirupa.com/t/help-targeting-movie-clips/7779 "2002-11-07T15:34:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ncar35b](https://avatars.discourse-cdn.com/v4/letter/n/ba9def/32.png) [@ncar35b](https://forum.kirupa.com/u/ncar35b)\
**Post date:** [November 7, 2002, 3:34pm UTC](https://forum.kirupa.com/t/help-targeting-movie-clips/7779/1 "2002-11-07T15:34:28Z")

</div>

I’m hoping someone can help me out. I have one scene with two movie clips (both are instances in frame one of scene one). Is something wrong with my syntax below, because when I change the value of “x” it’s not going to the correct frame in the movie clip. Thanks!

x=3  
if (x=1) {  
\_root.clipone.gotoAndPlay(15);  
} else if (x=2) {  
\_root.cliptwo.gotoAndPlay(5);  
} else if (x=3) {  
\_root.cliptwo.gotoAndPlay(20);  
} else {  
stop();  
}

---

<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:** [November 7, 2002, 3:52pm UTC](https://forum.kirupa.com/t/help-targeting-movie-clips/7779/2 "2002-11-07T15:52:56Z")

</div>

= is assignment wichi means x=3 means x is given value 3  
== is equivalence which means x==3 is compared to 3

so in your if statement you need ==  
ie if(x==1)  
{  
}

Happy Scripting
