To make your component receive mouse events even in its transparent
parts, fill those areas using 'graphics' with an alpha of 0. The Flash
Player's mouse-detection logic doesn't care whether the pixels are
opaque or transparent, it only cares that they have been "drawn".
 
- Gordon

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Roman Protsiuk
Sent: Wednesday, March 07, 2007 8:50 AM
To: [email protected]
Subject: Re: [flexcoders] Mouse events in non-drawn areas?



You can pass along this events to your component from the application
itself.
E.g.
// in application:
private function onMouseClick(event : MouseEvent) : void {
    yourComponent.onMouseClick(event);
}

R.


On 1/2/07, Reid Priedhorsky <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote: 

        Hi folks,
        
        I have a component which is a subclass of UIComponent. I would
like it 
        to receive mouse events (MouseDown, MouseUp, and MouseMove, 
        specifically) even in areas where there are no children and I
have not 
        drawn using this.graphics.
        
        Is this possible? Do any of you have ideas on how to do it or
where to 
        find more info?
        
        (I could work around it by drawing the background manually, but
that 
        seems awkward. I was hoping for some kind of switch or setting.
This is 
        Flex 2.)
        
        Thanks for any help,
        
        Reid
        

        


 

Reply via email to