We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Text in textbox update on-the-fly from other textbox text.

Medium Priority
327 Views
Last Modified: 2012-06-27
Hey all,

I have one text box (tb1) that is fed text from an XML file.  I would like another textbox (tb2) in the same swf to reflect the same text...help please.

FYI...the text in tb1 displays different text depending on the users' response and I would like tb2 to reflect that on-the-fly text.

Thanks in advance.

Comment
Watch Question

Add a CHANGE event listener to the TextField tb1 and onChange handler update the text in tb2.
Also you may add a change watcher.

Warm Regards
Deepanjan Das

Author

Commented:
I did the following:

tb1.addEventListener(EVENT.CHANGE, newText);
function newText(event:EVENT):void
{
	tb2.text = tb1.text;
}

Open in new window


Yet, it does not work.

Author

Commented:
UPDATED, yet does not work.

txtTranscript.addEventListener(Event.CHANGE, newText);
function newText(event:Event):void
{
	assetText_txt.text = txtTranscript.text;
}

Open in new window

What is tb1 or txtTranscript?
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Sorry, here it is corrected:

tb1.addEventListener(Event.CHANGE, newText);
function newText(event:Event):void
{        
tb2.text =tb1.text;
}

Open in new window


Checking out link now...

Author

Commented:
Thanks.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.