Hi, I’m trying to make a textfield appears in a random place of my stage everytime i click on it (stage).
this is my code until now:
stage.addEventListener(MouseEvent.CLICK, myFunction);
function myFunction(myevent:MouseEvent):void {
var myText:TextField = new TextField;
var myTextFormat:TextFormat = new TextFormat;
myTextFormat.color = Math.random() *0xffffff;
myTextFormat.size = Math.random() *20;
myText.text = “This is my text”;
myText.autoSize = TextFieldAutoSize.LEFT;
addChild(myText);
}
really i try to make a textfield only in B/W (no more colors, but with a random alpha value).
yeah i’m a randomholic…
random size, random place, random alpha, random rotation, and even random font. thats what i wanna make.
plz, any suggestions or ideas?
thx.