Hello there
I’m just starting with this powerfull option in flash
What I’m trying to do is writing a simple class thats buts some text on the stage.
the next script those not give any errors but can’t see anything on stage
package classlibrary{
import flash.display.*;
import flash.text.*;
public class MenuBuilder extends Sprite {
private var display_txt:TextField;
public function MenuBuilder (myVar) {
// check if the function is called
trace ('public function MenuBuilder');
//Check the content of MyVar
trace (myVar);
display_txt = new TextField();
display_txt.width = 250;
display_txt.x = 100;
display_txt.y = 100;
display_txt.text = myVar;
addChild (display_txt);
}
}
}
The code in my fla
import classlibrary.MenuBuilder;
var myvar:String = "A Variable"
var testClass:MenuBuilder = new MenuBuilder(myvar);