// alex lawrence

bdspiral at tweetcoding

Posted on 2009-03-01 in Actionscript

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

My second entry for #tweetcoding. Unlike many other entries this thing is using BitmapData so your browser will not crash or anything over time. The entry is called "bdspiral". The size of the swf is 953 bytes (< 1kb).

This time the code limit has been pushed to the maximum. 140 characters of confusing code. I don´t think I will win anything but it has been a lot fun coding for this contest.

g=graphics;mt=g.moveTo;lt=g.lineTo;ls=g.lineStyle;m=Math;r=m.random;s=m.sin;i=0;o={};function f(e){if(!i)addChild(new Bitmap(c=new BitmapData(500,500)));ls(1);mt(j=250,j);lt(j-(l=s(i-=.1)*j),k=j-m.cos(i)*j);lt(k,j+l);c.draw(this);g.clear()}addEventListener("enterFrame",f);

Beware that the code above consists of 280 characters, 140 setup code and 140 own code. If you don´t believe it you can compile it for yourself: Open Flash, go to Publish Settings/Actionscript, turn off Strict Mode and compile it.