flash on 2014-9-30
/**
* Copyright mutantleg ( http://wonderfl.net/user/mutantleg )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/ieRL
*/
package {
import flash.events.Event;
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
stage.addEventListener(Event.ENTER_FRAME, onEnter);
}//ctor
public var gt:int = 0;
public function onEnter(e:Event):void
{
graphics.clear();
var ax:Number; var ay:Number;
var ang:Number;
ang = gt*0.003+0.5;
ax = Math.cos(ang);
ay = Math.sin(ang);
// graphics.lineStyle(2,0);
// graphics.moveTo(225,225);
// graphics.lineTo(225+ax*128, 225+ay*128);
var am:Number;
var kx:Number; var ky:Number;
var wx:Number; var wy:Number;
var wx2:Number; var wy2:Number;
var i:int;
am = gt *0.1;
for (i = -8; i < 8; i++)
{
kx = 225 + ax * i*32;
ky = 225 + ay * i*32;
wx = kx -ay * Math.sin(am+i*0.4)* 32;
wy = ky + ax * Math.sin(am+i*0.4)*32;
wx2 = kx -ay * Math.sin(am+i*0.4+1.1)* 32;
wy2 = ky + ax * Math.sin(am+i*0.4+1.1)*32;
graphics.lineStyle();
graphics.beginFill(0, 1);
graphics.drawCircle(wx,wy, 8);
graphics.endFill();
graphics.beginFill(0, 1);
graphics.drawCircle(wx2,wy2, 8);
graphics.endFill();
graphics.lineStyle(4,0,0.5);
graphics.moveTo(wx,wy);
graphics.lineTo(wx2,wy2);
}//nexti
gt += 1;
}//onenter
}//classend
}