flash on 2014-9-30
♥0 |
Line 33 |
Modified 2014-09-30 20:32:28 |
MIT License
archived:2017-03-30 11:54:10
ActionScript3 source code
/**
* Copyright mutantleg ( http://wonderfl.net/user/mutantleg )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/qgEs
*/
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();
graphics.lineStyle(2,0,0.2);
var ang:Number;
ang = gt*0.06;
var i:int;
var ax:Number;
var ay:Number;
var m:Number;
for (i =0; i < 32; i++)
{
m= i*0.1;
//ax = 225 + Math.cos(ang+m)*Math.sin(ang+m) * 128;
// ay = 225 + Math.abs(Math.sin(ang+m)) * 128;
// m = ang+m;
// ax = 225 + Math.cos(m) * 128;
// ay = 225 + Math.abs(Math.sin(m)*Math.cos(m)) * 128;
// m = ang+m;
// ax = 225 + Math.sin(m)*Math.abs(Math.cos(m)) * 128;
// ay = 225 + Math.abs(Math.cos(m)) * 128;
//m = ang+m;
// m = ang+i*-0.02;
// ax = 225 + Math.sin(m) * i*4;
// ay = 225 + Math.abs(Math.cos(m)) * i*4;
m = (0.9+(i*0.03)) * Math.cos( 0.08 * gt );
//m = m +(i*-0.02);
ax = 225+Math.sin(m)*i*4;
ay = 225+Math.cos(m)*i*4;
graphics.drawCircle(ax,ay,4); //+Math.sin(ang*4+i*0.6)*4);
}//nexti
graphics.beginFill(0);
graphics.drawCircle(ax,ay,8);
graphics.endFill();
gt += 1;
}//onenter
}//classend
}