# AS 3.0 Button Frenzy

**URL:** https://forum.kirupa.com/t/as-3-0-button-frenzy/281377
**Category:** flash
**Created:** [February 8, 2009, 5:31pm UTC](https://forum.kirupa.com/t/as-3-0-button-frenzy/281377 "2009-02-08T17:31:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![drewmerl](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@drewmerl](https://forum.kirupa.com/u/drewmerl)
#### Post date: [February 8, 2009, 5:31pm UTC](https://forum.kirupa.com/t/as-3-0-button-frenzy/281377/1 "2009-02-08T17:31:56Z")

</div>

Good Day to All,

I figure I would start my venture into AS 3.0 with the simple stuff considering my AS 2.0 endeavors have not been exactly smooth sailing.

Motion tweening was easy as pie. I was able to update my clips accordingly.

Now the buttons…that’s a different story.

Here’s the original AS 2.0 code I had:

```php
on (rollOver) {
gotoAndPlay("on");
}

on (rollOut, dragOut) {
gotoAndPlay("off");
}
on (press) {
gotoAndPlay("click");
}
on (release) {
//load Movie Behavior
if (this._parent.container_mc == Number(this._parent.container_mc)) {
loadMovieNum("home.swf", this._parent.container_mc);
} else {
this._parent.container_mc.loadMovie("home.swf");
}
//End Behavior
}

```

I cannot figure how to translate that into AS 3.0. I got a few details on what to do from [Senocular here and [URL=“http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/MovieClip.html”]Flash Live Docs here](http://www.senocular.com/flash/tutorials/as3withflashcs3/?page=3#events). Unfortunately I have no idea on how to implement them correctly. :crying:

Here’s a consolidated attempt to implement AS 3.0:

```php
import flash.events.MouseEvent;
MouseEvent.MOUSE_OVER;
this.gotoAndPlay("on");

MouseEvent.ROLL_OUT;
this.gotoAndPlay("off");

```

See what I mean? Any advice?

Thank you.
