Re: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

2007-02-05 Thread slangeberg

I'd first try adding the listener to the stage of the item, else you can
place listener on the application itself.. something in ballpark of (sorry
if not exact spelling, objects, etc):

myHBox.stage.addEventListener( MouseEvent.MOUSE_UP, onMsUp );

-Scott

On 2/5/07, Douglas Knudsen [EMAIL PROTECTED] wrote:


  I'm converting a Flex 1.5 app to 2.0.  Under 1.5 I used a event on a
HBox called MouseUpSomewhere.  Seems this is no more in 2.0.  Any ideas
what it is now called?  Or maybe another way to get this same functionality
to work?  I can't use mouseOut.  I need a event that fires when the user
releases the mouse button whilst over a different component.

--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
 





--

: : ) Scott


Re: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

2007-02-05 Thread Michael Schmalle

Hi,

try adding a listener to the systemManager; IE

systemManager.addEventListener(MouseEvent.MOUSE_UP,
systemManager_mouseUpHandler);

Peace, Mike

On 2/5/07, Douglas Knudsen [EMAIL PROTECTED] wrote:


  I'm converting a Flex 1.5 app to 2.0.  Under 1.5 I used a event on a
HBox called MouseUpSomewhere.  Seems this is no more in 2.0.  Any ideas
what it is now called?  Or maybe another way to get this same functionality
to work?  I can't use mouseOut.  I need a event that fires when the user
releases the mouse button whilst over a different component.

--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


RE: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

2007-02-05 Thread Piotrowski, John
I ran into similar problems with handling mouse events when converting
an app from 1.5 to 2.0.  I found that most of the time, I wound up
transferring the eventlistener to another object (like the parent, since
mouse events propagate up).  But I have had success when adding the
mouse_up event inside the mxml to the this scope like:
this.addEventListener(MouseEvent.MOUSE_UP,doMouseUp);

 

John

 

** 

 John R. Piotrowski 

 Programmer Analyst 

 Wharton Computing 

 Email: [EMAIL PROTECTED]

**

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Douglas Knudsen
Sent: Monday, February 05, 2007 1:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

 

I'm converting a Flex 1.5 app to 2.0.  Under 1.5 I used a event on a
HBox called MouseUpSomewhere.  Seems this is no more in 2.0.  Any ideas
what it is now called?  Or maybe another way to get this same
functionality to work?  I can't use mouseOut.  I need a event that fires
when the user releases the mouse button whilst over a different
component. 

-- 
Douglas Knudsen
http://www.cubicleman.com http://www.cubicleman.com 
this is my signature, like it? 

 



Re: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

2007-02-05 Thread Douglas Knudsen

that adds a mouseUp listener/handler for the whole app, eh?  How do I know
if this mouseUp is related to the object the user gestured a mouseDown on?
Kind of coupled up too.

What I have is this screen snap
http://www.cubicleman.com/snaps/snap.png
I have mouseDown capture on the bluish color box that allows me to drag it
left/right and to shrink/expand the length of it while holding the mouse
button down on it.  Now, if the user is holding the mouse button down and
accidentally moves the mouse off of the bluish box and then lets the mouse
button go, I want to fire a event then that executes a method inside the
component representing the bluish box.

Starting to think maybe just fire the mouseOut event and ignore this
possible user accident!



DK

On 2/5/07, Michael Schmalle [EMAIL PROTECTED] wrote:


Hi,

try adding a listener to the systemManager; IE

systemManager.addEventListener(MouseEvent.MOUSE_UP,
systemManager_mouseUpHandler);

Peace, Mike

On 2/5/07, Douglas Knudsen [EMAIL PROTECTED] wrote:

   I'm converting a Flex 1.5 app to 2.0.  Under 1.5 I used a event on a
 HBox called MouseUpSomewhere.  Seems this is no more in 2.0.  Any ideas
 what it is now called?  Or maybe another way to get this same functionality
 to work?  I can't use mouseOut.  I need a event that fires when the user
 releases the mouse button whilst over a different component.

 --
 Douglas Knudsen
 http://www.cubicleman.com
 this is my signature, like it?




--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.






--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


RE: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

2007-02-05 Thread Grant Davies
oh yeah..
 
lets add a numeric status and right now it can be 0 or 1 and a message
that goes with it..
 
Grant
 
 
...
 b l u e t u b e i n t e r a c t i v e.
.: grant davies
.: 404.428.6839 (c)
.: 708-983-1577 (F)
 [EMAIL PROTECTED]
 http://www.bluetube.com/bti http://www.bluetube.com/bti 
 A Tribal Chicken Designs Affiliate http://www.tribalchicken.com/ 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Douglas Knudsen
Sent: Monday, February 05, 2007 3:17 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] MouseUpSomewhere event, whence hast thou gone?



that adds a mouseUp listener/handler for the whole app, eh?  How do I
know if this mouseUp is related to the object the user gestured a
mouseDown on?  Kind of coupled up too.

What I have is this screen snap
http://www.cubicleman.com/snaps/snap.png
http://www.cubicleman.com/snaps/snap.png 
I have mouseDown capture on the bluish color box that allows me to drag
it left/right and to shrink/expand the length of it while holding the
mouse button down on it.  Now, if the user is holding the mouse button
down and accidentally moves the mouse off of the bluish box and then
lets the mouse button go, I want to fire a event then that executes a
method inside the component representing the bluish box.  

Starting to think maybe just fire the mouseOut event and ignore this
possible user accident!  

 file:///C:/DOCUME%7E1/e0074191/LOCALS%7E1/Temp/moz-screenshot.jpg 

DK


On 2/5/07, Michael Schmalle [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

Hi,

try adding a listener to the systemManager; IE

systemManager.addEventListener(MouseEvent.MOUSE_UP,
systemManager_mouseUpHandler);

Peace, Mike


On 2/5/07, Douglas Knudsen [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 


I'm converting a Flex 1.5 app to 2.0.  Under 1.5 I used
a event on a HBox called MouseUpSomewhere.  Seems this is no more in
2.0.  Any ideas what it is now called?  Or maybe another way to get this
same functionality to work?  I can't use mouseOut.  I need a event that
fires when the user releases the mouse button whilst over a different
component. 

-- 
Douglas Knudsen
http://www.cubicleman.com http://www.cubicleman.com 
this is my signature, like it? 






-- 
Teoti Graphix
http://www.teotigraphix.com http://www.teotigraphix.com 

Blog - Flex2Components
http://www.flex2components.com http://www.flex2components.com 

You can find more by solving the problem then by 'asking the
question'. 




-- 
Douglas Knudsen
http://www.cubicleman.com http://www.cubicleman.com 
this is my signature, like it? 

 
attachment: small.jpg


Re: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

2007-02-05 Thread Ben Stucki

Douglas,

The method Michael is talking about should work fine for you. Although the 
listener is on the whole app, the function called is still scoped to your 
component.  
You really don't want to use the mouseOff event to stop 
dragging, as users will find that annoying to no end.  
Here's an example component that should make it a little more 
clear.

?xml version=1.0 encoding=utf-8?
mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; 
horizontalScrollPolicy=off verticalScrollPolicy=off
mx:Script
![CDATA[

 private function mouseDownHandler(event:MouseEvent):void {
 button.startDrag(false, new 
Rectangle(rule.x,rule.y+rule.height/2-button.height/2, rule.width-button.width, 
0));
 systemManager.addEventListener(MouseEvent.MOUSE_UP, 
mouseUpHandler, false, 0, true);
 }

 private function mouseUpHandler(event:MouseEvent):void {
 systemManager.removeEventListener(MouseEvent.MOUSE_UP, 
mouseUpHandler, false);
 button.stopDrag();
 }

]]
/mx:Script
mx:HRule id=rule left=0 right=0 height=3 verticalCenter=0 /
mx:RadioButton id=button selected=true 
mouseDown=mouseDownHandler(event) 
top={rule.y+rule.height/2-button.height/2} height=13 width=13 /
/mx:Canvas

Ben Stucki 

---

We're Hiring! Seeking a passionate developer to join our team building Flex

based products. Position is in the Washington D.C. metro area. If interested

contact [EMAIL PROTECTED]



From: Douglas Knudsen [EMAIL PROTECTED]
Sent: Monday, February 05, 2007 12:18 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] MouseUpSomewhere event, whence hast thou gone? 

that adds a mouseUp listener/handler for the whole app, eh?  How do I know if 
this mouseUp is related to the object the user gestured a mouseDown on?  Kind 
of coupled up too.

What I have is this screen snap

http://www.cubicleman.com/snaps/snap.png
I have mouseDown capture on the bluish color box that allows me to drag it 
left/right and to shrink/expand the length of it while holding the mouse button 
down on it.  Now, if the user is holding the mouse button down and accidentally 
moves the mouse off of the bluish box and then lets the mouse button go, I want 
to fire a event then that executes a method inside the component representing 
the bluish box.  

Starting to think maybe just fire the mouseOut event and ignore this possible 
user accident!  

DK

On 2/5/07, Michael Schmalle [EMAIL PROTECTED] wrote:

Hi,

try adding a listener to the systemManager; IE

systemManager.addEventListener(MouseEvent.MOUSE_UP, 
systemManager_mouseUpHandler);

Peace, Mike

On 2/5/07, 
Douglas Knudsen [EMAIL PROTECTED] wrote:

I'm converting a Flex 1.5 app to 2.0.  Under 1.5 I used a event on a HBox 
called MouseUpSomewhere.  Seems this is no more in 2.0.  Any ideas what it is 
now called?  Or maybe another way to get this same functionality to work?  I 
can't use mouseOut.  I need a event that fires when the user releases the mouse 
button whilst over a different component.

-- 
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?

-- 
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

-- 
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?






Re: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

2007-02-05 Thread Michael Schmalle

Doug,

It's because you add the mouse up listener in the mouse down action.

then you KNOW it is a mouse up from the last mouse down.

in the mouse up, remove the mouse up. :)

Peace, Mike

On 2/5/07, Grant Davies [EMAIL PROTECTED] wrote:


   oh yeah..

lets add a numeric status and right now it can be 0 or 1 and a message
that goes with it..

Grant


...
*› b l u e t u b e i n t e r a c t i v e.*
.: grant davies
.: 404.428.6839 (c)
.: 708-983-1577 (F)
› [EMAIL PROTECTED]
› http://www.bluetube.com/bti
› A Tribal Chicken Designs Affiliate http://www.tribalchicken.com/


 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Douglas Knudsen
*Sent:* Monday, February 05, 2007 3:17 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

 that adds a mouseUp listener/handler for the whole app, eh?  How do I
know if this mouseUp is related to the object the user gestured a mouseDown
on?  Kind of coupled up too.

What I have is this screen snap
http://www.cubicleman.com/snaps/snap.pnghttp://www.cubicleman.com/snaps/
snap.png
I have mouseDown capture on the bluish color box that allows me to drag it
left/right and to shrink/expand the length of it while holding the mouse
button down on it.  Now, if the user is holding the mouse button down and
accidentally moves the mouse off of the bluish box and then lets the mouse
button go, I want to fire a event then that executes a method inside the
component representing the bluish box.

Starting to think maybe just fire the mouseOut event and ignore this
possible user accident!



DK

On 2/5/07, Michael Schmalle teoti.graphix@ [EMAIL PROTECTED]
gmail.com wrote:

 Hi,

 try adding a listener to the systemManager; IE

 systemManager.addEventListener(MouseEvent.MOUSE_UP,
 systemManager_mouseUpHandler);

 Peace, Mike

 On 2/5/07, Douglas Knudsen douglasknudsen@ [EMAIL PROTECTED]
 gmail.com wrote:
 
I'm converting a Flex 1.5 app to 2.0.  Under 1.5 I used a event on a
  HBox called MouseUpSomewhere.  Seems this is no more in 2.0.  Any
  ideas what it is now called?  Or maybe another way to get this same
  functionality to work?  I can't use mouseOut.  I need a event that fires
  when the user releases the mouse button whilst over a different component.
 
  --
  Douglas Knudsen
  http://www.cubicleman.comhttp://www.cubicleman.com
  this is my signature, like it?
 



 --
 Teoti Graphix
 http://www.teotigraphix.comhttp://www.teotigraphix.com

 Blog - Flex2Components
 http://www.flex2components.comhttp://www.flex2components.com

 You can find more by solving the problem then by 'asking the question'.




--
Douglas Knudsen
http://www.cubicleman.comhttp://www.cubicleman.com
this is my signature, like it?

 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.
attachment: small.jpg


Re: [flexcoders] MouseUpSomewhere event, whence hast thou gone?

2007-02-05 Thread Douglas Knudsen

aha, 1/2 way to eureka!  Thanks Michael and Ben, think I get it now.  its
working smoothly now.

DK

On 2/5/07, Michael Schmalle [EMAIL PROTECTED] wrote:


Doug,

It's because you add the mouse up listener in the mouse down action.

then you KNOW it is a mouse up from the last mouse down.

in the mouse up, remove the mouse up. :)

Peace, Mike

On 2/5/07, Grant Davies [EMAIL PROTECTED] wrote:

oh yeah..

 lets add a numeric status and right now it can be 0 or 1 and a message
 that goes with it..

 Grant


 ...
 *› b l u e t u b e i n t e r a c t i v e.*
 .: grant davies
 .: 404.428.6839 (c)
 .: 708-983-1577 (F)
 › [EMAIL PROTECTED]
 › http://www.bluetube.com/bti
 › A Tribal Chicken Designs Affiliate http://www.tribalchicken.com/


  --
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Douglas Knudsen
 *Sent:* Monday, February 05, 2007 3:17 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] MouseUpSomewhere event, whence hast thou
 gone?

  that adds a mouseUp listener/handler for the whole app, eh?  How do I
 know if this mouseUp is related to the object the user gestured a mouseDown
 on?  Kind of coupled up too.

 What I have is this screen snap
 http://www.cubicleman.com/snaps/snap.png http://www.cubiclem
 an.com/snaps/snap.png
 I have mouseDown capture on the bluish color box that allows me to drag
 it left/right and to shrink/expand the length of it while holding the mouse
 button down on it.  Now, if the user is holding the mouse button down and
 accidentally moves the mouse off of the bluish box and then lets the mouse
 button go, I want to fire a event then that executes a method inside the
 component representing the bluish box.

 Starting to think maybe just fire the mouseOut event and ignore this
 possible user accident!



 DK

 On 2/5/07, Michael Schmalle teoti.graphix@ [EMAIL PROTECTED]gmail.com
 wrote:

  Hi,
 
  try adding a listener to the systemManager; IE
 
  systemManager.addEventListener(MouseEvent.MOUSE_UP,
  systemManager_mouseUpHandler);
 
  Peace, Mike
 
  On 2/5/07, Douglas Knudsen douglasknudsen@ [EMAIL PROTECTED]
  gmail.com wrote:
  
 I'm converting a Flex 1.5 app to 2.0.  Under 1.5 I used a event on
   a HBox called MouseUpSomewhere.  Seems this is no more in 2.0.  Any
   ideas what it is now called?  Or maybe another way to get this same
   functionality to work?  I can't use mouseOut.  I need a event that fires
   when the user releases the mouse button whilst over a different component.
  
   --
   Douglas Knudsen
   http://www.cubicleman.com http://www.cubicleman.com
   this is my signature, like it?
  
 
 
 
  --
  Teoti Graphix
   http://www.teotigraphix.comhttp://www.teotigra phix.com
 
  Blog - Flex2Components
  http://www.flex2components.com http://www.flex2components.com
 
  You can find more by solving the problem then by 'asking the
  question'.
 



 --
 Douglas Knudsen
  http://www.cubicleman.comhttp://www.cubiclem an.com
 this is my signature, like it?




--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.






--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
attachment: small.jpg