That took some legwork.  The short of it is that the behavior appears in IE, 
but not Firefox.

The current system that I'm using for testing is Windows XP, Flash Player 10 
(10.0.12.36) Debug, Flex SDK 3.2.0.  IE is 7.0.5730.11CO.  Firefox is 3.0.5.

I can also describe the IE behavior more precisely.

Assert: When you click-drag off the browser application window and then release 
your mouse button, you should get mouseLeave.  

In Firefox, it works consistently.

In IE (for me), it works inconsistently.  In particular, it behaves in one of 
two ways:  

(1) If I click-drag up off the label and onto the browser tab bar or if I 
click-drag left without leaving the bounds of the label until moving off the 
browser window, I do get mouseLeave, but I get mouseLeave as soon as I leave 
the application window—just as if I weren't click-dragging but I were just 
mousing over.

(2) If I click-drag down off the label and _then_ left off the application 
window, I get no mouseLeave at all.




--- In [email protected], Alex Harui <aha...@...> wrote:
>
> MouseLeave for me on windows.  What is your configuration?
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of graham.t...@...
> Sent: Friday, March 13, 2009 3:15 PM
> To: [email protected]
> Subject: [flexcoders] Re: stage mouseUp not firing outside app window
> 
> 
> You bet. Here's my current version (modified from my first post).
> 
> Many thanks!
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
> applicationComplete="onApplicationComplete(event)" 
> viewSourceURL="srcview/index.html">
> 
> <mx:Script>
> <![CDATA[
> import mx.events.FlexEvent;
> 
> private function onApplicationComplete(e:FlexEvent):void
> {
> stage.addEventListener(Event.MOUSE_LEAVE, onMouseLeave);
> //stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
> //systemManager.topLevelSystemManager.addEventListener(MouseEvent.ROLL_OUT,onRollOut);
> //stage.addEventListener(MouseEvent.ROLL_OUT,onRollOut);
> //Application.application.addEventListener(MouseEvent.ROLL_OUT,onRollOut);
> //Application.application.stage.addEventListener(MouseEvent.ROLL_OUT,onRollOut);
> }
> 
> private function onMouseLeave(e:Event):void
> {
> trace ("onMouseLeave");
> }
> 
> private function onMouseUp(e:MouseEvent):void
> {
> trace ("onMouseUp fired");
> }
> 
> private function onRollOut(e:MouseEvent):void
> {
> trace ("onRollOut fired");
> }
> ]]>
> </mx:Script>
> 
> <mx:Canvas id="testContainer" width="400" height="100" 
> backgroundColor="#00ff00">
> <mx:Label text="Click-drag from _label_ to off-window. Release. No mouseUp."/>
> </mx:Canvas>
> </mx:Application>
> 
> --- In [email protected]<mailto:flexcoders%40yahoogroups.com>, Alex 
> Harui <aharui@> wrote:
> >
> > We use MOUSE_LEAVE successfully in Flex. Maybe post a simple test case.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: [email protected]<mailto:flexcoders%40yahoogroups.com> 
> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On 
> > Behalf Of graham.tony@
> > Sent: Friday, March 13, 2009 2:43 PM
> > To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Re: stage mouseUp not firing outside app window
> >
> >
> > Many thanks for the response!
> >
> > For me, this is behaving just like mouseUp.
> >
> > I do get a mouseLeave when I mouse out of the application, and I _can_ get 
> > one when I click-drag out of the application.
> >
> > However, I do _not_ get a mouseLeave when I click on the label and drag out 
> > of the application (and release the mouse).
> >
> > If I happened to click on that label, then I can't get it to work, and I 
> > need it no matter where (or what) I click on the stage.
> >
> > I added the following to my prior test:
> >
> > stage.addEventListener(Event.MOUSE_LEAVE, onMouseLeave);
> >
> > and
> >
> > private function onMouseLeave(e:Event):void
> > {
> > trace ("onMouseLeave");
> > }
> >
> > --- In 
> > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> >  Alex Harui <aharui@> wrote:
> > >
> > > A mouseup off-stage is usually sent as EVENT.as:MOUSE_LEAVE
> > >
> > > Alex Harui
> > > Flex SDK Developer
> > > Adobe Systems Inc.<http://www.adobe.com/>
> > > Blog: http://blogs.adobe.com/aharui
> > >
> > > From: 
> > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > >  
> > > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>]
> > >  On Behalf Of graham.tony@
> > > Sent: Friday, March 13, 2009 1:44 PM
> > > To: 
> > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > > Subject: [flexcoders] Re: stage mouseUp not firing outside app window
> > >
> > >
> > > I gave it a shot, but the behavior was the same: click-drag from a label 
> > > to somewhere off the application screen won't report a rollOut or 
> > > subsequent mouseUp.
> > >
> > > So I begin to think I simply can't track click-drag's off screen (or that 
> > > they even went off-screen). I'm working on a particular scrolling 
> > > feature; so this is problematic, given that users can click-drag from 
> > > anywhere in my container.
> > >
> > > --- In 
> > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> > >  Fotis Chatzinikos <fotis.chatzinikos@> wrote:
> > > >
> > > > did you try on the Application.application (might be the same as stage 
> > > > but
> > > > you never know...)
> > > >
> > > > On Fri, Mar 13, 2009 at 6:53 PM, graham.tony@ <
> > > > graham.tony@> wrote:
> > > >
> > > > > Many thanks for your response!
> > > > >
> > > > > I was hoping for the mouseUp, but I did try the rollOut, as you 
> > > > > suggested.
> > > > > I couldn't even get it to work on Stage. SystemManager worked fine on 
> > > > > a
> > > > > normal rollOut, but it worked only intermittently (I know that sounds
> > > > > strange, but it's what it is) on a click-drag from the label.
> > > > >
> > > > > Attempts:
> > > > >
> > > > >
> > > > > //systemManager.topLevelSystemManager.addEventListener(MouseEvent.ROLL_OUT,onRollOut);
> > > > > stage.addEventListener(MouseEvent.ROLL_OUT,onRollOut);
> > > > >
> > > > >
> > > > > --- In 
> > > > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > > > >  <flexcoders%40yahoogroups.com>, Fotis
> > > > > Chatzinikos <fotis.chatzinikos@> wrote:
> > > > > >
> > > > > > I think this is a known problem... What about adding a stage rollout
> > > > > event,
> > > > > > and then there dispatch a mouse up if needed?
> > > > > >
> > > > > > Give it a go (have not tested myself)
> > > > > >
> > > > > > On Fri, Mar 13, 2009 at 5:45 PM, graham.tony@ <
> > > > > > graham.tony@> wrote:
> > > > > >
> > > > > > >
> > > > > > > In the following example, I've got a stage-level mouseUp 
> > > > > > > listener. In
> > > > > the
> > > > > > > application window, I can click-drag off-window and, when I 
> > > > > > > release,
> > > > > the
> > > > > > > mouseUp event will fire.
> > > > > > >
> > > > > > > However, if I start my click-drag on the label and release 
> > > > > > > off-screen,
> > > > > I do
> > > > > > > _not_ get the mouseUp event.
> > > > > > >
> > > > > > > (I think setting mouseChildren=false on thetestContainer resolves 
> > > > > > > the
> > > > > issue
> > > > > > > for this test, but it's not practical for my application.)
> > > > > > >
> > > > > > > Anyone have any ideas?
> > > > > > >
> > > > > > > <?xml version="1.0" encoding="utf-8"?>
> > > > > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > > > > > > layout="absolute"
> > > > > > > applicationComplete="onApplicationComplete(event)">
> > > > > > >
> > > > > > > <mx:Script>
> > > > > > > <![CDATA[
> > > > > > > import mx.events.FlexEvent;
> > > > > > >
> > > > > > > private function onApplicationComplete(e:FlexEvent):void
> > > > > > > {
> > > > > > > stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
> > > > > > > }
> > > > > > >
> > > > > > > private function onMouseUp(e:MouseEvent):void
> > > > > > > {
> > > > > > > trace ("onMouseUp fired");
> > > > > > > }
> > > > > > > ]]>
> > > > > > > </mx:Script>
> > > > > > >
> > > > > > > <mx:Canvas id="testContainer" width="400" height="100"
> > > > > > > backgroundColor="#00ff00">
> > > > > > > <mx:Label text="Click-drag from _label_ to off-window. Release. No
> > > > > > > mouseUp."/>
> > > > > > > </mx:Canvas>
> > > > > > > </mx:Application>
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Fotis Chatzinikos, Ph.D.
> > > > > > Founder,
> > > > > > Phinnovation
> > > > > > Fotis.Chatzinikos@,
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Fotis Chatzinikos, Ph.D.
> > > > Founder,
> > > > Phinnovation
> > > > Fotis.Chatzinikos@,
> > > >
> > >
> >
>


Reply via email to