# F5- nested ifs

**URL:** <https://forum.kirupa.com/t/f5-nested-ifs/7795>\
**Category:** flash\
**Created:** [November 7, 2002, 9:16pm UTC](https://forum.kirupa.com/t/f5-nested-ifs/7795 "2002-11-07T21:16:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![beff](https://avatars.discourse-cdn.com/v4/letter/b/dc4da7/32.png) [@beff](https://forum.kirupa.com/u/beff)\
**Post date:** [November 7, 2002, 9:16pm UTC](https://forum.kirupa.com/t/f5-nested-ifs/7795/1 "2002-11-07T21:16:40Z")

</div>

Hi,  
I have an if like this:  
on (release) {  
stopDrag ();  
if (\_root.go\_blue.\_droptarget == “/g\_target”)  
{then (\_root.dancing.gotoAndPlay(2));  
}else (\_root.dancing.stop())  
}  
}  
This works. I need to add “if (test = “one”)”, another drop sets this variable and the drop above should test for it. But I can’t get the basics right! I’m a programmer who is new to Actionscript. What I want is:  
“If the variable is correct AND if it is dropped on the target (g\_target) THEN play the movie, ELSE go back to \_x=130, \_y=300.”  
The variable is being assigned correctly, I tested it with a Dynamic text box. The movie isn’t running with my code!  
Help!!  
Brian

---

<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 8, 2002, 2:05am UTC](https://forum.kirupa.com/t/f5-nested-ifs/7795/2 "2002-11-08T02:05:41Z")

</div>

Hi,  
I found an article on “attach movie and variables” in the archive and it explained that you have to refer to variables with “.” notation, so “if (\_root.go\_Green.test == “one”)” made it go.  
thanks
