# Navigation Problems

**URL:** <https://forum.kirupa.com/t/navigation-problems/272262>\
**Category:** flash\
**Created:** [October 3, 2008, 10:46am UTC](https://forum.kirupa.com/t/navigation-problems/272262 "2008-10-03T10:46:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![J\_Mo](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@J\_Mo](https://forum.kirupa.com/u/J_Mo)\
**Post date:** [October 3, 2008, 10:46am UTC](https://forum.kirupa.com/t/navigation-problems/272262/1 "2008-10-03T10:46:49Z")

</div>

Hi there,  
I am trying to control what \_root frame a movieclip goes to when it is finished from a \_root button and am having some problems.

This is what I want to happen:

When the button is released go to a specific frame of the desired mc, if the last frame of that corresponding mc is reached go to a specific \_root frame. (i hope this makes sense)

The script is as follows:

on (release) {  
cube\_mc.gotoAndPlay(“cubeplay”);  
if (cube\_mc.\_currentframe == cube\_mc.\_totalframes) {  
\_root.gotoAndPlay(home);  
}  
}

Could u give me any scripting help as I am a bit of a novice.  
J\_Mo
