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: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of graham.t...@rocketmail.com
Sent: Friday, March 13, 2009 1:44 PM
To: flexcoders@yahoogroups.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 flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, Fotis 
Chatzinikos <fotis.chatzini...@...> 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.t...@... <
> graham.t...@...> 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 flexcoders@yahoogroups.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.chatzini...@...,
>

Reply via email to