Hah, yes, it does work, just need to addChild: my_btn.addEventListener(MouseEvent.CLICK, myFunction); my_btn.buttonMode = true; function myFunction(event:MouseEvent):void { //do something } addChild(my_btn);
jimbo *********** REPLY SEPARATOR *********** On 6/27/2007 at 7:14 AM Adam Pasztory wrote: >Also, the client just wants the buttons delivered in a simple graphical >format, so they can add code later. They don't want me to send them an FLA >with a ton of code in it, like in Leandro's example. > >I would go ahead and just use button symbols, but my problem is that these >buttons also have an "inactive" state, which can be represented by a >SimpleButton object. In AS2, I just would have added an "_inactive" frame >to the button. >_______________________________________________ >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 _______________________________________________ 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