smudge 0 Newbie Poster

Hey there I am new to this game. I have to create a ball puzzle to display in a webpage it consists of a tube and 8 balls 4 black and 4 white the white balls are slightly larger than the black balls I need to be able to manipulate them to get the black balls out of the tube. I can draw them but need to get this into an array Can anyone help please?