I have prepared a number and sent it in the text box. Now I want to save that number for later use. Arrays (for my very limited knowledge) are the places to maintain that data that you want to access later How do I do this?
My code is still:
roll_button. AdAventLustner (MouseEvent.Cilike, Roladis); Function rolledis (Event: Mouse Event): Zero {var die1: uint = Math.floor (Math.Randem) * 6) + 1; Var die2: uint = Math.floor (Math.Random) * 6) + 1; Die1_txt.text = die1.toString (); Die2_txt.text = die2.toString (); Sec1_txt.text = (die1 + die2) .toString (); }
I want to add results to "sec1_txt.text" in the array.
Thanks in advance.
Use this:
var myArray: Array = new Array (); MyArray.push (die1 + die2)
You can also use a vector which is a specific (UIT) array.
Comments
Post a Comment