Thanks Jim, I've set up the AS3 event handler as you've specified, and it does change the cursor from an arrow to a pointer, but the _up, _down and _over states don't work. I pasted the same button symbol into an AS2 FLA file, and it does work, so there isn't anything wrong with the way I've set my frame labels in the button symbol.
According to the docs, it should work in AS3: "If you use the buttonMode property with the MovieClip class (which is a subclass of the Sprite class), your button might have some added functionality. If you include frames labeled _up, _over, and _down, Flash Player provides automatic state changes (functionality similar to that provided in previous versions of ActionScript for movie clips used as buttons)." Can anyone else get this working in AS3??? On 6/27/07, Jim Berkey <[EMAIL PROTECTED]> wrote:
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
_______________________________________________ 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