PDA

View Full Version : Get a text field to mirror the contents of another text field [renamed]


darrenleong
05-04-2007, 04:07 AM
hi guys. When i type the numbers in the box A.i want the number also appears in box B without typiing it, how to do this? Hope to hear ur replies soon.

( This is my link to my to the picture )
http://download.yousendit.com/ADA616D00C698A56 (http://download.yousendit.com/ADA616D00C698A56)

glidealong
05-04-2007, 04:41 AM
hi guys. When i type the numbers in the box A.i want the number also appears in box B without typiing it, how to do this? Hope to hear ur replies soon.

( This is my link to my to the picture )
http://download.yousendit.com/ADA616D00C698A56 (http://download.yousendit.com/ADA616D00C698A56)

first of all import the events class by writing the following code

import flash.events.*;add an event listener for box A which should be something like
boxA.addEventListener(KeyboardEvent.KEY_DOWN,OnKey Press);this should listen to any key press events and execute the function OnKeyPress defined along with, which should be something like

private function OnKeyPress (e:Event):void{
boxB.text = boxA.text;
}
this is basically what you need to get through..