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
Tjitte
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Change Multitouch.inputMode on runtime

Hello,

 

When my app starts it sets the Multitouch.inputMode to MultitouchInputMode.TOUCH_POINT.

When I change that to MultitouchInputMode.GESTURE it doesn't work. When I trace Multitouch.inputMode it says that it is in gesture mode but it does not act like it. Is this a bug?

 




My PlayBook app:
DrawBook
Please use plain text.
Contributor
Miaomiao
Posts: 26
Registered: ‎05-22-2011
My Device: Playbook
My Carrier: Rogers

Re: Change Multitouch.inputMode on runtime

Is it running on the simulator? The gestures only work on real device

Please use plain text.
New Developer
Tjitte
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Re: Change Multitouch.inputMode on runtime

I am testing it on a real device.

My PlayBook app:
DrawBook
Please use plain text.
Developer
Developer
CMY
Posts: 1,122
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Change Multitouch.inputMode on runtime

When you say that it doesn't act like it, what do you mean? What is it doing or not doing when you change the mode?

Please use plain text.
New Developer
Tjitte
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Re: Change Multitouch.inputMode on runtime

When I change Multitouch.inputMode from MultitouchInputMode.TOUCH_POINT to MultitouchInputMode.GESTURE and then read the value of trace(Multitouch.inputMode) it says that it is using gesture. But when i have an event with type TransformGestureEvent it does not dispatch it.


My PlayBook app:
DrawBook
Please use plain text.
New Developer
Tjitte
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Re: Change Multitouch.inputMode on runtime

I found this: I can successfully change Multitouch.inputMode in the main class but when I change it in an external class it doesn't work always.


My PlayBook app:
DrawBook
Please use plain text.
Contributor
Miaomiao
Posts: 26
Registered: ‎05-22-2011
My Device: Playbook
My Carrier: Rogers

Re: Change Multitouch.inputMode on runtime

Is it because other class change the Multitouch inputMode after?

 

The way I would do is:

 

In the class, assuming it's a display object

 

addEventListener(Event.ADDED_TO_STAGE, onDisplay);

 

public function onDisplay(event:Event):void {

MultiTouch.inputMode = .....

Please use plain text.
New Developer
Tjitte
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Re: Change Multitouch.inputMode on runtime

I want it to be changed when an user clicks a button.


My PlayBook app:
DrawBook
Please use plain text.
Developer
CoCopia
Posts: 231
Registered: ‎05-03-2011
My Device: PlayBook V1 and proud of it :-)
My Carrier: Legs

Re: Change Multitouch.inputMode on runtime

the code wouldn't be that different from MiaoMiao, place the MultiTouch.inputMode = ... inside the button click event, see how that goes.
Keep the Forum productive and useful for all. Click Kudos button if I've helped you. Select Solved to help everyone.

PlayBook qualifying app - Pandoras' Lights
Blog - CoCopia.co.uk Catch me on Twitter cocopia_apps
Please use plain text.
New Developer
Tjitte
Posts: 100
Registered: ‎10-31-2010
My Device: Dev Alpha C and PlayBook

Re: Change Multitouch.inputMode on runtime

 


CoCopia wrote:
the code wouldn't be that different from MiaoMiao, place the MultiTouch.inputMode = ... inside the button click event, see how that goes.

I've already done that and got the issue described in my first post.


My PlayBook app:
DrawBook
Please use plain text.