forked from: Hello World
forked from Hello World (diff: 7)
Application entry-point
ActionScript3 source code
/**
* Copyright WinField95 ( http://wonderfl.net/user/WinField95 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/dFVK
*/
// forked from easily's Hello World
// forked from easily's flash on 2011-8-19
package
{
import flash.display.Shape;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.display.Sprite;
/**
* Application entry-point
*/
[SWF(backgroundColor = 0x0FFFFF, frameRate = 40, width = 465, height = 465)]
public class Application extends Sprite
{
public function Application()
{
//uncomment to enable debugger console
//Debugger.setParent(this, true);
//debug('started in ' + this);
//This is a simple animation example. Replace with your own code
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.frameRate = 30;
x = y = 170;
var a:Array = [];
for (var i:uint = 0; i < 50; i++)
{
var s:Shape = new Shape;
s.graphics.clear();
s.graphics.beginFill(i * 0x0000FF + i * 0x10, .07);
s.graphics.drawRoundRect(10+i, 10+i, 100, 100, 30);
s.graphics.endFill();
addChild(s);
a.push(s);
}
addEventListener('enterFrame', function(e:Event):void
{
var i:uint;a
for each(s in a)
s.rotation += (i++) / 3;
rotation += .6;
rotationY += .4;
});
}
}
}