• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

copy text field to another text field

New Here ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

trying to make a label maker. And I have an onscreen keyboard that allows me to enter text. wondering how I can copy it and put it in a prinintg animation. Still new to as3

TOPICS
ActionScript

Views

798

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

if you want to use text (entered into a textfield) elsewhere in your app when the textfield no longer exists, assign the textfield's text property to a variable (when the textfield exists).  you can then use that variable even when the textfield (and its text) no longer exist.

var tfS:String=your_tf.text;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

How would I go about displaying the varible in the textbox in another movieclip.

printedTxt = MovieClip(parent).savedTxt;

not seeming to work. I have my savedTxt in the movieclip before this.

thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

LATEST

that depends.

if your code is on the parent timeline of the movieclip, the movieclip's reference is mc and the textfield's reference in mc is savedTxt, use:

var printedTxt:String = mc.savedTxt.text;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines