Mouse events bubble. Tou're seeing mouseOver/mouseOut events from the
HBoxes, VBoxes, UITextFields, etc that are children of the Canvas. You
can determine if the Canvas is the display object processing the event
by querying the currentTarget property on the event object. 

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dbronk
Sent: Friday, November 02, 2007 1:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Why is mouseOut being called?

I have a very basic Canvas.  It has a VBox that holds some text and
then under that is a HBox that holds some other test.  The canvas has
both mouseOver and mouseOut events defined.  I also tried rollOver and
rollOut and get the exact same thing.  When I move my cursor in
between the text lines in the top VBox as was as when I move the
cursor in between the top VBox and the bottom HBox, the mouseOut event
fires.  Also the rollOut fires when I try that.  Why?  I'm clearly
withing the Canvas.  Here is the Canvas with some scripts removed...

Thanks,
Dale

<?xml version="1.0" encoding="utf-8"?>

<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml";
xmlns:components="components.*" mouseOver="onMouseOver(event)"
mouseOut="onMouseOut(event)">


        <mx:Script>
                <![CDATA[
                        private function
onMouseOver(event:MouseEvent):void
                        {
                                trace("onMouseOver");
                        {
                        
                        private function
onMouseOut(event:MouseEvent):void
                        {
                                trace("onMouseOut");
                        }
                
                ]]>
        </mx:Script>

        <mx:VBox width="100%" paddingLeft="10">
                <mx:Text id="listingNameText" text="{listing.title}"
width="100%" height="24" styleName="resultTitle" />
                <mx:Text id="listingLocation" text="{listing.city},
{listing.state}" width="100%" height="13.5" styleName="resultCity" />
                <mx:Text id="listingDesc" text="{listing.description}"
width="100%" height="25" styleName="resultDesc" />
        </mx:VBox>
        <mx:HBox id="listingDollars" width="100%" horizontalGap="0"
height="18" bottom="0" paddingLeft="10">
                <mx:HBox horizontalGap="0" width="30%">
                        <mx:Text text="CF:" styleName="resultFinHead"
width="15"/>
                        <mx:Text text="{
usdFormatter.format(StringUtils.nullToBlank(listing.cashFlow)) }"
styleName="resultFinValue" width="60" height="18"/>
                </mx:HBox>
                <mx:HBox horizontalGap="0" width="30%">
                        <mx:Text text="R:" styleName="resultFinHead"
width="15"/>
                        <mx:Text text="{
usdFormatter.format(StringUtils.nullToBlank(listing.revenue)) }"
styleName="resultFinValue" width="60" height="18"/>
                </mx:HBox>
                <mx:HBox horizontalGap="0" width="40%">
                        <mx:Text text="A:" styleName="resultFinHead"
width="15"/>
                        <mx:Text text="{
usdFormatter.format(StringUtils.nullToBlank(listing.price)) }"
styleName="resultFinValueSorted" width="60" height="18"/>
                </mx:HBox>
        </mx:HBox>

</mx:Canvas>






--
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



Reply via email to