<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="onCreationComplete()"
mouseDown="onMouseDown()"
horizontalScrollPolicy="off"
verticalScrollPolicy="off"
backgroundColor="#FFFFFF"
viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import caurina.transitions.Tweener;
private var circles : Array = [];
private function onCreationComplete() : void
{
for ( var z:int = 0; z < 50; z++)
{
var cr : CircleRenderer = new CircleRenderer();
cr.color = Math.random() * 0xFFFFFF;
circles.push( cr );
addChild( cr );
randomize( cr );
}
}
private function onMouseDown() : void
{
for each ( var cr : CircleRenderer in circles )
{
randomize( cr );
}
}
private function randomize( cr : CircleRenderer ) : void
{
Tweener.addTween( cr,
{
size: Math.random() * 300,
alpha: Math.random(),
x: Math.random() * width,
y: Math.random() * height,
time: 1,
transition: "easeInOutQuart"
} );
}
]]>
</mx:Script>
</mx:Application>