Dropping the spheres
The player will be able to drop the spheres by clicking with the mouse on the column he/she wants to drop a sphere. Once a sphere has been dropped, it will fall down until it touches the floor of the balance or another sphere.
We need another class level variable to store the position of the row where the sphere will drop, just like we are storing the position of the column with
selCol. Add the new variable, called
private var balance:balance_mc=new balance_mc(); private var gameArray:Array; private var ball:ball_mc; private var selCol:int; private var selRow:int; private var gameStatus:String="placing";
Do you see something strange in these variable declarations?
selRow have been defined as integers, but ...