Sample
♥0 |
Line 47 |
Modified 2009-11-26 13:49:26 |
MIT License
archived:2017-03-20 16:26:32
ActionScript3 source code
/**
* Copyright a24 ( http://wonderfl.net/user/a24 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/p7ZQ
*/
package
{
import flash.display.Sprite;
[ SWF( width = "465" , height = "465" , backgroundColor = "0xFFFFFF" , frameRate = "60" ) ]
public class Main extends Sprite
{
public function Main()
{
var mc1:RotationMc = new RotationMc( 80 , 230 );
var mc2:RotationMc = new RotationMc( 180 , 230 );
var mc3:RotationMc = new RotationMc( 280 , 230 );
var mc4:RotationMc = new RotationMc( 380 , 230 );
addChild( mc1 );
addChild( mc2 );
addChild( mc3 );
addChild( mc4 );
mc1.start();
mc2.start();
mc3.start();
mc4.start();
}
}
}
import flash.display.Sprite;
import flash.events.Event;
class RotationMc extends Sprite
{
public function RotationMc( x:Number , y:Number )
{
this.x = x;
this.y = y;
graphics.beginFill( 0x111111 , 1.0 );
graphics.drawRect( -25 , -25 , 50 , 50 );
}
public function start():void
{
addEventListener( Event.ENTER_FRAME , enterFrameHandler );
}
public function stop():void
{
removeEventListener( Event.ENTER_FRAME , enterFrameHandler );
}
private function enterFrameHandler( e:Event ):void
{
rotation ++;
}
}