# Button AS2

**URL:** <https://forum.kirupa.com/t/button-as2/322812>\
**Category:** flash\
**Created:** [June 4, 2011, 4:40am UTC](https://forum.kirupa.com/t/button-as2/322812 "2011-06-04T04:40:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mysticlife](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@mysticlife](https://forum.kirupa.com/u/mysticlife)\
**Post date:** [June 4, 2011, 4:40am UTC](https://forum.kirupa.com/t/button-as2/322812/1 "2011-06-04T04:40:17Z")

</div>

I have posted this question earlier, but I don’t seem to understand the variables. How to use them or were to put them.  
I’m wondering if there is a way to do it like this:

I have done a fade in and fade out for each frame label section, what I can’t seem to figure out is how to code a button to tell it to finish playing current scene or section before jumping to the frame label associated with the button.

So if you are currently on the \_home page and you click the contact button I want to play out current section (\_home) (for the fade out) and then gotoAndPlay(\_contact) (that fades in)

It is not the entire page that fades in and out just a graphic on each page, the background and everything else stays the same throughout.

If anyone has any ideas on how to write a code that with say play out 10 frames and the gotoAndPlay(\_framelable)

Any advice is appreciated!!
