script
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.events.CuePointEvent;
import mx.controls.videoClasses.CuePointManager;
[Bindable] public var first:String = "../assets/clips/tube/balloon.flv";
[Bindable] public var movie:String = first;
[Bindable] private var arrColl:ArrayCollection = new ArrayCollection();
[Bindable] private var state:uint = 0;
private var off:int = 0;
[Bindable] private var radius:uint = 100;
[Bindable] private var ball:Sprite = new Sprite();
[Bindable] private var square:Sprite = new Sprite();
[Bindable] private var slist:Sprite = new Sprite();
[Bindable] private var vx:Number;
[Bindable] private var vy:Number;
[Bindable] private var bounce:Number = -1.0; //-0.9;
[Bindable] private var gravity:Number = 0; //-0.001;
private var oldX:Number;
private var oldY:Number;
private var sprites:Array;
private var smax:uint = 0;
private var avx:Array;
private var avy:Array;
private var arz:Array;
private function init() : void {
avx = new Array();
avy = new Array();
arz = new Array();
input.text = first;
myVid.source = movie;
off = 1;
var h:Number = systemManager.stage.stageHeight;
var w:Number = systemManager.stage.stageWidth;
ball.graphics.beginFill(0xff0000);
ball.graphics.drawCircle(0, 0, radius);
ball.x = 200;
ball.y = 200;
//avx.push(Math.random() * 30 - 5);
//avy.push(-20);
//slist.addChild(ball);
sprites = new Array();
//sprites.push(ball);
myVid.addChild(slist);
//myVid.mask = slist;
addEventListener(Event.ENTER_FRAME, frame);
addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
}