Change dynamic textfield value in Flash [AS3]

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Sindarin
Forum Regular
Posts: 521
Joined: Tue Sep 25, 2007 8:36 am
Location: Greece

Change dynamic textfield value in Flash [AS3]

Post by Sindarin »

With actionscript 2, I would just create a new dynamic textfield, set it to variable testvar and simply write at a frame or button press,

Code: Select all

var testvar = testvar+2
That would increase the variable +2 each time and the textfield would just show it.

How I can achieve the same effect with Actionscript 3? I am well aware that components like textarea cannot have actionscript assigned to them anymore.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Change dynamic textfield value in Flash [AS3]

Post by Jonah Bron »

Maybe I don't understand, but I believe you have to use the text property (dynamic_text_field.text)
Post Reply