How to make a button that controls the value of a dynamic text box
hey fellas
i wanted make bill maker .. sort of myself . have few products lets , click on them , clicking on buttons see numbers add in dynamic text box , keep track of value inside box.
lets have 2 buttons . clicking 1st , 2nd want 12 in text box , clicking 2nd , 1st 21 in box .
is atall possible as2 ?
please guide me through
thanks.
sure:
tf.text=""; //tf textfield displays results of movieclip button clicks
for(var i:number=0;i<9;i++){
this["btn_"+i].ivar=i; // use movieclip buttons btn_1, btn_2,..,btn_9
this["btn_"+i].onrelease=btnf;
}
function btnf():void{
tf.text+=this.ivar;
}
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment