var curr_box;
var depthLevel = 3000;
var boxCounter = 1;
function createBox()
{
curr_box = cloudLayer.attachMovie(“box”, “” + boxCounter, depthLevel);
curr_box._x = 800;
curr_box._y = Math.random() * 420;
curr_box._xscale = curr_box._yscale = 90;
curr_box.speed = 15;
boxCounter += 1;
depthLevel += 1;
curr_box.onEnterFrame = boxMove;
}
function boxMove()
{
if (_root.Player.hitTest(this) )
{
Player.visible = false;
}