package {
import flash.display.MovieClip;
import flash.events.*;
public class H2O extends MovieClip {
var speedx:Number=0;
var speedy:Number=0;
public function H2O() {
speedx=0.5*Math.random()-0.5;
speedy=5*Math.random();
this.addEventListener(Event.ENTER_FRAME,MOVE);
}
function MOVE(e:Event):void {
this.x+=speedx;
this.y-=speedy;
if (this.y<0) {
init();
}
}
function init() {
this.y=400;
this.x=Math.random()*550;
}
}
}