Arrays with textboxes
Hi I am new to flash and trying to output numbers I have put into textboxes with a button.
My code so far:
var myArray: Array = new Array(); myArray.push(Number(textbox1.text)) myArray.push(Number(textbox2.text)) myArray.push(Number(textbox3.text)) button1.addEventListener( MouseEvent.MOUSE_UP, function(evt:MouseEvent):void { trace(myArray); } );
So I have made 3 textboxes and a button, I run this, and when I input info into these textboxes and hit the button it displays 0,0,0 like it doesn't read the numbers i have inputted into the textbox.
Any thoughts?
thank you in advance x
