One way to instantiate a mc as a button in as3 is:

my_btn.addEventListener(MouseEvent.CLICK, myFunction);
my_btn.buttonMode = true;
function myFunction(event:MouseEvent):void {
        //do something
}



jimbo
*********** REPLY SEPARATOR  ***********

On 6/26/2007 at 9:40 PM Adam Pasztory wrote:

>In ActionScript 2, I never used button symbols.  Instead I would create
>buttons as MovieClips, give the frames of the buttons labels -- "_up",
>"_down", "_over" -- and assign an event handler to them.
>
>I tried this in AS3, but it didn't seem to work.  Is there some new secret
>to MovieClip buttons in Flash 9?
>
>thanks,
>Adam
>_______________________________________________
>Flashcoders@chattyfig.figleaf.com
>To change your subscription options or search the archive:
>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>Brought to you by Fig Leaf Software
>Premier Authorized Adobe Consulting and Training
>http://www.figleaf.com
>http://training.figleaf.com

s

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to