Skip to main content
Inspiring
July 31, 2012
Answered

how to make a desktop app ready for tablet

  • July 31, 2012
  • 1 reply
  • 3611 views

I have a flash drawing tool on desktop, and just tried to use it on a windows 7 tablet pc.

The system comes with two virtual keyboards, a bigger one that the user has to actively open, and a smaller one that offers itself near many text entry fields (such as system file dialogs)

Now with flash only the bigger one is available, and when I type into it, flash player seems to lose focus.

What would be the best way to handle this situation?

Another part of the story: would it be possible to have 3 checkboxes inside the flash app that reflect the state of shift, ctrl, and alt keys and send keypress / keyrelease events such that mouse events report correct keyboard state?

This topic has been closed for replies.
Correct answer sinious

Hi,

I finally found some solution to this puzzle: The method is copied from mx.managers.Systemmanager:

register a high-priority listener for the mouse event. In the listener, if the event is not cancelable, it is the original event received from the player. Stop immediate propagation and then redispatch a new event, with cancelable = true (to distinguish it from the original event and avoid an infinite loop) and set key states according to the virtual keyboard

I still have to find out whether to handle MOUSE_DOWN and CLICK, or just one of them


Probably just one of them and it always feels snappier if you use MOUSE_DOWN instead of CLICK unless you plan on handling the situation where a user can press down on something but move their finger off the item to "cancel" that click.

Thanks for posting part of your solution. If you're all done please mark the thread as answered. Good luck!

1 reply

sinious
Legend
July 31, 2012

The keyboard is an application itself, so yes it will take focus.

Your best option at this point, because a windows 7 tablet is not in the mobile device "realm", is to make your own keyboard. There is some integration with actual mobile devices to pop up specific mobile device keyboards but you can't take advantage of that because Microsoft's aim at tablets is making them "a real computer". So you don't have the mobile device keyboard functionality.

You can find some readily made AS3 keyboards if you google around. Then you control look, feel and focus.

Inspiring
July 31, 2012

Well, thanks a lot. I will go and look around for one

sinious
Legend
July 31, 2012

They're easy to find, hope you find one that meets your design needs. You're welcome and good luck!