Hello,
I have an actionscript class, and when I make a new one, the constructor is suposed to create a new textfield. but nothing shows up. here is my .as file:
package scripts
{
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldType;
public class QuizSentence extends Sprite
{
public function QuizSentence():void{
trace("constructor");
var myText:TextField = new TextField();
myText.text = "Republic of Code";
addChild(myText);
}
}
}
When i put the same code into the actual timeline, it works fine. What could be wrong? No compile errors.
Thanks!