# Button:convert AS2 script to AS3

**URL:** <https://forum.kirupa.com/t/button-convert-as2-script-to-as3/293870>\
**Category:** flash\
**Created:** [August 5, 2009, 6:55am UTC](https://forum.kirupa.com/t/button-convert-as2-script-to-as3/293870 "2009-08-05T06:55:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![donkeykong](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@donkeykong](https://forum.kirupa.com/u/donkeykong)\
**Post date:** [August 5, 2009, 6:55am UTC](https://forum.kirupa.com/t/button-convert-as2-script-to-as3/293870/1 "2009-08-05T06:55:28Z")

</div>

hi all

I have this animated button in AS2 and I was wondering how to convert to  
AS3 can anyone help?

I have a movieclip, with AS2 script, rollover go to and play frame x, this is the script

```auto
stop();
on (rollOver) {
      gotoAndPlay(2);
}
 on (rollOut) {
            gotoAndPlay(8);
}

```

can any help convert this so it works in AS3, I have attached an example of the AS2 script button

many thanks:emb:
