hello :)
to attach a Sprite, MovieClip, TextField, , DisplayObject in a
DisplayObjectContainer you must use the addChild method :
Read the examples in my article about TextField in AS3 (the article is in
french but the code is in AS3 ;))
http://www.ekameleon.net/blog/index.php?2006/07/18/38
you created a text field, but you probably didn't add it to any display
objects.
import flash.display.Sprite;
import flash.text.TextField;
var myTextField:TextField = new Textfield();
myTextField.text = txt;
addChild( myTextField);
myTextField.x = X;
myTextField.y = Y
The important bit you go
Hey folks,
Im trying to learn how to set a TextField on the stage dynamically with
ActionScript 3
something like
public function addText(txtname:String, txt:String, X:int, Y:int,
format:TextFormat):void {
//using array notation for a new variable does NOT WORK
var [txtname]:Te
3 matches
Mail list logo