# Your advice about \_root, please

**URL:** <https://forum.kirupa.com/t/your-advice-about--root-please/34603>\
**Category:** flash\
**Created:** [November 4, 2003, 1:42pm UTC](https://forum.kirupa.com/t/your-advice-about--root-please/34603 "2003-11-04T13:42:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brintonwhite](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@brintonwhite](https://forum.kirupa.com/u/brintonwhite)\
**Post date:** [November 4, 2003, 1:42pm UTC](https://forum.kirupa.com/t/your-advice-about--root-please/34603/1 "2003-11-04T13:42:51Z")

</div>

I have managed to sort this out but want to know if I am doing this the right way - is it the most efficient way?

Here goes.

I have my main timeline with a frame lable at frame 30 called main.  
I have placed a movieclip on frame 1 of my main timeline. Inside the movieclip I have a button and on the last frame i have the following actionscript:

\_root.gotoAndPlay(“main”);

Now on my button I use actionscript to go to the above frame with the \_root.gotoAndPlay(“main”); instruction on it. This works fine and does send me back to the main timeline. I am just wondering if this is the best way to accomplish this?

Is there actionscript that can be put on the button alone that will send it to the frame lable in the main timeline? I pressume it would be similar to the above code but with an “on release” attached, I dont know the correct syntax.

In fact, I’ll post an FLA in case my explanation isn’t clear

Thank you

---

<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 4, 2003, 5:42pm UTC](https://forum.kirupa.com/t/your-advice-about--root-please/34603/2 "2003-11-04T17:42:51Z")

</div>

Well if you’re going to apply that script to a button then it needs to be inside a button handler, like this:

```auto
on (release){
_root.gotoAndPlay("main");
}

```

---

<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 4, 2003, 9:09pm UTC](https://forum.kirupa.com/t/your-advice-about--root-please/34603/3 "2003-11-04T21:09:21Z")

</div>

Thanks electrongeek.

I thought it would be something like that.
