Copy link to clipboard
Copied
Hey fellas
I wanted to make a bill maker .. sort of for myself . I have a few products lets say and I would like to click on them and by clicking on those buttons I would to see numbers add up in a dynamic text box and so I could keep track of the value inside the box.
Lets say we have 2 buttons . by clicking the 1st and 2nd I want to get 12 in my text box and by clicking 2nd and 1st I would like to get 21 in my box .
Is this atall possible with AS2 ?
please guide me through
Thanks.
sure:
tf.text=""; //tf is your textfield that displays the results of your 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;
}
Copy link to clipboard
Copied
sure:
tf.text=""; //tf is your textfield that displays the results of your 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;
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now