Virtual keyboard

 

The goal is to show you how to build a virtual keyboard.
It's a case study. I only 'll give the basic essentials. You 'll have to complete the script.

Problem :
I own a 9" netbook with a touch screen and Windows7 Ultimate as OS. (a crap from Ar..os), with OS Windows Seven Ultimate, I noticed when I activated the virtual keyboard with the hardware button, the software (with a field to fill in) and the keyboard shared the screen but when keyboard was off, the display of the software kept its new size ( reduced of course ).
I decided to create a virtual keyboard just for flash applications.
Please, feel free to copy the following picture :

clavier virtuel

Insert in the swi.
Just keep in mind that variables inside the keyboard swf 'll be called with _parent adressing and variables of the main movie ( the one which 'll call the keyboard swf ) with _root.
I suppose you know how to handle a keyboard. Doesn't it ?
Let's go.

Creating Objects

1 - Movie size 913x262. Any background color.
Frame rate = 25.

2 - Insert the previous picture.

3 - Create a green led for Caps.
Watch out the pictures :

properties   transform

caps lock

4 - It's up to you to proceed for other leds

Script animation

Each key of the keyboard acts as a button, so , let 's create a set of dummy buttons.
We 'll plan the Shift, Caps Lock and Alt Gr buttons thants to HandleEvent function.
You 'll have to complete.
Enter the following script inScene_1 :

Et voilà, it's almost done!

 


Si vous aimez le site

 

Select a language if you need :


Page chargée en 0.004 sec.

Dernière Modification : Mer 25 Janvier 2017 8:56
Copyright © 1999-2017 Jean-Paul Molina Tous droits réservés.

to Google