# Complex Buttons in AS3

**URL:** <https://forum.kirupa.com/t/complex-buttons-in-as3/243953>\
**Category:** flash\
**Created:** [November 12, 2007, 10:41pm UTC](https://forum.kirupa.com/t/complex-buttons-in-as3/243953 "2007-11-12T22:41:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonatha2](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@jonatha2](https://forum.kirupa.com/u/jonatha2)\
**Post date:** [November 12, 2007, 10:41pm UTC](https://forum.kirupa.com/t/complex-buttons-in-as3/243953/1 "2007-11-12T22:41:34Z")

</div>

I am trying to build a complex button with Flash CS3, with Up, Over, Out, and Outside states, similar to the menus on this site: [http://www.titled.co.uk/07/index.html](http://www.titled.co.uk/07/index.html)

I have the AS2 code but I need it in AS3. Can anyone help, or point me somewhere that teaches something similar to that site? Thanks in advance.

The code I use for AS 2 is:

stop()

this.onRollOver = function(){  
this.gotoAndPlay(“over”);  
}  
this.onRollOut = function(){  
this.gotoAndPlay(“out”);  
}  
this.onRelease = function(){  
this.gotoAndPlay(“over”);  
/\* add code here if you would like your button to have greater functionality on release. For example, you could call getURL() to open up another web page.  
\*/  
}  
this.onReleaseOutside = function(){  
this.gotoAndPlay(“outside”);  
}
