MANY great tnx! it works!
this is my final code:
the "onRelease = null" is not necessary kuz a Button component
allready transmit it.
and the "keyDown" function fires a click event on ENTER key press.

any comments?

class myComponents.myButton extends mx.controls.Button {
        public function myButton(){
                addEventListener("mouseOver", this);
        }
                
        private function mouseOver(event: Object) : Void {
                event.target.useHandCursor = true;
        }
        
        private function keyDown(event: Object) : Void {
                if(Key.isDown(Key.ENTER))dispatchEvent({ type: "click" });
        }
}


--- In flexcoders@yahoogroups.com, "Doug Lowder" <[EMAIL PROTECTED]> wrote:
>
> You can set the useHandCursor and onRelease properties in a mouse 
> over handler, like so:
> 
> class myComponents.myButton extends mx.controls.Button {
> 
>     public function myButton(){
>         extraSpacing = 50;
>         this.btnOffset = 1;
>         label = "NO LABEL";
>         addEventListener("mouseOver", this);
>     }
> 
>     function mouseOver(event: Object) : Void {
>         event.target.useHandCursor = true;
>         event.target.onRelease = null;
>     }
> }







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to