[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-04-26
7
Medium Priority
?
319 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.

0
Comment
Question by:ModifyMe
  • 4
  • 3
7 Comments
 
LVL 17

Expert Comment

by:deepanjandas
ID: 35467901
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
0
 

Author Comment

by:ModifyMe
ID: 35468034
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.
0
 

Author Comment

by:ModifyMe
ID: 35468067
UPDATED, yet does not work.

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

Open in new window

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:deepanjandas
ID: 35468857
What is tb1 or txtTranscript?
0
 
LVL 17

Accepted Solution

by:
deepanjandas earned 2000 total points
ID: 35468866
0
 

Author Comment

by:ModifyMe
ID: 35469058
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...
0
 

Author Closing Comment

by:ModifyMe
ID: 35470032
Thanks.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to count occurrences of each item in an array.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses
Course of the Month20 days, 11 hours left to enroll

865 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question