# Please help!

**URL:** <https://forum.kirupa.com/t/please-help/141316>\
**Category:** Uncategorized\
**Created:** [March 18, 2005, 8:23pm UTC](https://forum.kirupa.com/t/please-help/141316 "2005-03-18T20:23:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishone](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@ishone](https://forum.kirupa.com/u/ishone)\
**Post date:** [March 18, 2005, 8:23pm UTC](https://forum.kirupa.com/t/please-help/141316/1 "2005-03-18T20:23:58Z")

</div>

I’m trying to create a code that will direct the user to a certain frame and have the last frame of the sequence depend on which button is pressed on the main stage. It seems to be basic actionscript (If/Else), but as you’ll see, I’m new to all of this. Here’s my code:

Set Variable:“x”=\_root.Nav\_mc.\_currentframe;  
on (release) {  
if(\_root.Nav\_mc.(x+\_nextframe == 11));  
\_root.Nav\_mc.gotoAndPlay(“end”);  
}else{  
\_root.Nav\_mc.gotoAndPlay(\_nextframe);  
}  
}
