So I currently have an array set up that has nothing in it until the user picks 5 numbers (there are a total of 59 numbers(the numbers are in a chart)). So now I am wondering if there is a way to call the first number picked and place it at a certain point on the screen then the second and so on from there. Here is just a little bit of the code I am using currently.
var pickFive:Array = new Array (5);
var m_iNextElement:int = 0;
Game.board.btn_1.addEventListener(MouseEvent.CLICK, btn1);
Game.board.btn_2.addEventListener(MouseEvent.CLICK, btn2);
Game.board.btn_3.addEventListener(MouseEvent.CLICK, btn3);
Game.board.btn_4.addEventListener(MouseEvent.CLICK, btn4);
Game.board.btn_5.addEventListener(MouseEvent.CLICK, btn5);
Game.board.btn_6.addEventListener(MouseEvent.CLICK, btn6);
function btn1(event:MouseEvent):void{
if(m_iNextElement <= 4){
Game.board.btn_1.gotoAndStop(2);
pickFive[m_iNextElement] = 1;
m_iNextElement++;
}
}
function btn2(event:MouseEvent):void{
if(m_iNextElement <= 4){
Game.board.btn_2.gotoAndStop(2);
pickFive[m_iNextElement] = 2;
m_iNextElement++;
}
}
function btn3(event:MouseEvent):void{
if(m_iNextElement <= 4){
Game.board.btn_3.gotoAndStop(2);
pickFive[m_iNextElement] = 3;
m_iNextElement++;
}
}
function btn4(event:MouseEvent):void{
if(m_iNextElement <= 4){
Game.board.btn_4.gotoAndStop(2);
pickFive[m_iNextElement] = 4;
m_iNextElement++;
}
}
function btn5(event:MouseEvent):void{
if(m_iNextElement <= 4){
Game.board.btn_5.gotoAndStop(2);
pickFive[m_iNextElement] = 5;
m_iNextElement++;
}
}
function btn6(event:MouseEvent):void{
if(m_iNextElement <= 4){
Game.board.btn_6.gotoAndStop(2);
pickFive[m_iNextElement] = 6;
m_iNextElement++;
}
}