text input, to change something

Commenta 10th July , 2009
hey all

i made a textInput, that affects the number of items on stage, now what i want is when i change the number of the input text, i want to see the items number change too

i do that, then i press enter, but nothing actually happens, any idea whats wrong???

ActionScript Code:
var txtFld:TextField = new TextField(); txtFld.x = txtFld.y = 20; txtFld.width = 30; txtFld.height = 20; txtFld.border = txtFld.background = true; txtFld.type = TextFieldType.INPUT; txtFld.maxChars = 2; txtFld.restrict = "0-9"; txtFld.appendText("10"); addChild(txtFld); stage.focus = txtFld; var handNum:Number = new Number(txtFld.text); var spacing:Number = stage.stageWidth/handNum; var spacingY:Number = stage.stageHeight/handNum; for (var i:uint = 0; i <handNum; i++) {     var hand:MovieClip = new Hand();         hand.y = (i * spacingY/2) + stage.stageHeight/4     hand.x = stage.stageWidth/2     addChild(hand); }

Original post by archloxx

Lascia un Commento