Call a fieldtext in stage from a Class
Hello, guys, I can´t figure out this, hopefully somebody can guide me, since all the related topics I could find were pointing in another direction (create a fieldtext in stage from within a Class).
Lets say I already have a dynamic fieldtext in stage, and its instance name is "txt1".
Now, I want to put some text in it from a Class (not the Main Class, but any other one):
package {
import flash.display.Sprite;
import flash.display.Stage;
import flash.text.TextField;
public class printText extends TextField{
public function printText () {
TextField(root).txt1.text = "abc"; // This didn´t work
this_parent[txt1].text = "abc"; // Neither do this
}
}
}
Any help would be really appreciate it!
Happy hollydays to everyone, thanks in advance! ![]()
