# Problems with navigating "\_root" and "this"

**URL:** <https://forum.kirupa.com/t/problems-with-navigating--root-and-this/284087>\
**Category:** Uncategorized\
**Created:** [March 14, 2009, 11:42pm UTC](https://forum.kirupa.com/t/problems-with-navigating--root-and-this/284087 "2009-03-14T23:42:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![laddesign](https://avatars.discourse-cdn.com/v4/letter/l/90db22/32.png) [@laddesign](https://forum.kirupa.com/u/laddesign)\
**Post date:** [March 14, 2009, 11:42pm UTC](https://forum.kirupa.com/t/problems-with-navigating--root-and-this/284087/1 "2009-03-14T23:42:30Z")

</div>

I coded a BACK button so that it would go back to the previous frame on the timeline, wherever that frame might have been. I got code off the internet. This is it:

Steps to making a ‘Back’ button:

1. In the first frame of the movie, initialize an array which holds all the interesting frames that are to be visited:  
[INDENT] [FONT=Courier New]navStack = [];[/FONT]  
[/INDENT] 2. In each interesting frame, add a script to that frame number so that it’s on the list of interesting frames that are to be visited:  
[INDENT] [FONT=Courier New]navStack.push(\_currentFrame);[/FONT]  
[/INDENT] 3. Put the following script on the ‘Back’ button that sends the playback head past the most recent interesting frame to the previous interesting frame:  
[INDENT] [FONT=Courier New]on (release) {  
if (\_root.navStack.length \> 1) {  
[/FONT][INDENT][FONT=Courier New] recentFrame = \_root.navStack.pop();  
previousFrame = \_root.navStack.pop();  
gotoAndPlay(previousFrame);  
}  
[/FONT][/INDENT][FONT=Courier New] } [/FONT]  
[/INDENT] All was well and good until, for purposes of the preloader, I put everything that I had on the main “parent” timeline into a “child” movie clip. I changed all references to “\_root” to “this”. The back button should work, right?

Wrong. It does nothing. It goes nowhere.

What have I missed?
