Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Developer
daniel_wind
Posts: 56
Registered: ‎02-07-2011
My Device: BB Playbook
Accepted Solution

MOUSE_MOVE Event on PlayBook

Hi guys,

 

I know this has been mentioned before in the forum but I want to make sure MOUSE_MOVE event is fully supported by the PlayBook.

 

I am simulating a "custom" dragging behavior using this sort of mouseEvent and I would like to know if anyone has implemented this. I see in simulator it works fine.

 

Thanks, 

-------------------------------------
www.danielwind.net

Playbook App:
Grab Da Crab
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: MOUSE_MOVE Event on PlayBook

Sure it's supported, why not?  I don't recall any threads saying it might not be.

 

The thing is, MOUSE_MOVE events are generated at a high rate.  In the simulator, that's at least 100Hz... way way more than you need if you're merely doing dragging.

 

In such a case, you're likely better off (if the standard startDrag() stuff isn't okay for you) to set/clear a flag in MOUSE_DOWN/MOUSE_UP, and in an ENTER_FRAME handler (which runs at your frameRate) you handle the dragging stuff if the flag is set.

 

(Also best to add/remove that enterFrame handler when not dragging, if you don't have another purpose for it.)


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Developer
daniel_wind
Posts: 56
Registered: ‎02-07-2011
My Device: BB Playbook

Re: MOUSE_MOVE Event on PlayBook

Hi Peter,

 

Thanks for your quick response. I appreciate your solution suggestions to the problem.

 

Thanks,

-------------------------------------
www.danielwind.net

Playbook App:
Grab Da Crab