// alex lawrence

graphicsftw at tweetcoding

Posted on 2009-02-22 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.

This is my first entry for #tweetcoding. I think it is quite cool so I post it here also. Beware that the whole thing is using graphics so it will slow down the longer it is running.

The setup code consists of about 140 characters of code and my entry is 120 chars long. So the whole actionscript code for this thing is only 253 characters.

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){p=500;i=p/4;}if(i++==p/4){i=u=v=1;j=k=p/2;c=r()*(1<<24)}u+=r()-.5;v+=r()-.5;j+=u;k+=v;ls(1,c);mt(p/2,p/2);lt(j,k)}addEventListener("enterFrame",f);

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.