Howto use vnkeys with TextField

vnkeys is originally designed to work with flash.text.TextField and you can feel it when typing. The replacement happens smoothly. It is easy to use and the code bellow will explain how to…

package {
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFieldType;
 
	import org.vnmedia.vnkeys.KeyConverter;
	import org.vnmedia.vnkeys.mapping.VNIMap;
	// define swf dimension
	[SWF(width=160, height=60)]
	// this is an application class
	public class vnmedia_vnkeys extends Sprite
	{
		public function vnmedia_vnkeys()
		{
			var textinput:TextField = new TextField();
			// give this text input a size
			// and positioning it
			textinput.width = 150;
			textinput.height = 50;
			textinput.x = 5;
			textinput.y = 5;
			// use multiline, ie textarea
			textinput.multiline = true;
			textinput.type = TextFieldType.INPUT;
			// give it background white
			// so we can see what we are typing
			textinput.backgroundColor = 0xFFFFFF;
			textinput.background = true;
			// NOW create a converter
			// for this TextField instance
			var converter:KeyConverter =
				new KeyConverter(textinput,VNIMap.NAME);
			// add this text input to application
			this.addChild(textinput);
		}
	}
}

The result:

Type using VNI input method

One Comment

  1. Webmaster says:

    Hello! Please e-mail me your contacts. I have a question webmaster@spottovo.ru” rel=”nofollow”>……

    Thank you!!!…