# AS3 clickon button

**URL:** https://forum.kirupa.com/t/as3-clickon-button/279989
**Category:** flash
**Created:** [January 21, 2009, 12:53pm UTC](https://forum.kirupa.com/t/as3-clickon-button/279989 "2009-01-21T12:53:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![boruze](https://avatars.discourse-cdn.com/v4/letter/b/5daacb/32.png) [@boruze](https://forum.kirupa.com/u/boruze)
#### Post date: [January 21, 2009, 12:53pm UTC](https://forum.kirupa.com/t/as3-clickon-button/279989/1 "2009-01-21T12:53:29Z")

</div>

Hey everyone,

Help needed!!! i’m sure my problem is not that difficult to sort out, but I just don’t know how to finalize my action script.

my project is: i have a pack of paper on the screen. when user clicks on the pack, it unwraps. then i want the paper to wrap up once again if user clicks on it the second time.

what i’ve managed to do so far is: when user clicks, the pack unwraps, however, when user clicks once again, the pack instead of wrapping up step by step, simply comes back to initial position

hope this is clear.  
here is the script i wrote:

button1.buttonMode = true;  
button1.addEventListener(MouseEvent.CLICK,mouseDownHandler1);

function mouseDownHandler1(event:MouseEvent):void {  
event.currentTarget.gotoAndPlay(“over”);  
}

what needs to be added?  
any suggestions?

thanks.
