Earlier this year Grant Skinner organized a coding competition called Tweetcoding. The task was particularly simple: to code something cool in ActionScript3 using at most 140 characters (whence the name, tweetcoding). As everyone else writing a blog did, let me re-post my submissions, too (another reason is that it seems that the original site with all submissions is down now). There is nothing really to talk about code-wise to dissect – it’s so short, just read it and enjoy the “coolness.”
Anemone
My first entry was called Anemone.
The Code:
if(i++<9)o[i-1]={x:275,y:200,a:l=i,w:30};with(o[i%l]){if(w>5)o[l++]={x:x,y:y,a:a,w:w};ls(w--,i);mt(x,y);lt(x+=9*s(2-a),y+=9*s(a+=r()*.6+6))}
Wormhole
I was really happy about Wormhole, because it seemed to become an inspiration for piXelero’s winning entry Tunnel of Stripes.
The Code:
g.clear();for(c=-90;c++;){d=91+(c-i*10)%90;ls(.1*d+9/d,0,1/d);g.drawCircle(275+.3*(s(i)+s(2*i))*(d+99),200+30*s(i),999/d)}i+=.01
The next submission received a notable mention, Twister.
The Code:
g.clear();for(c=999;c--;mt(c,k=275))if(!i)o[c]=r();else ls(1,lt(c,k),l=o[c],g.drawCircle(k+l*c*s(i+c)/9+99*s(i*.1)*s(2-2*l),k-l*k,.5));i+=.1
Grass
Fourth is Grass.
The Code:
g.clear();for(m=c=275;c--;ls(1,c<<8))for(u=c&4,v=9,mt(p=m+m*s(c*6),q=m+99*s(c*5)),k=.1+s(c+i)/20,d=15;d--;u+=v*k,v-=u*k)lt(p+=u,q-=v);i+=.1
Fur
Last but not least. At the time of the competition, our whole office became obsessed with the “fur effect” that you can see in the blog header. It was a bit challenging to recreate the effect in 140 characters, but it worked out well and I also had a couple of characters left to give the result a form, Female Form (let it run for a while).
The Code:
l=r();o.a=r()*7;mt(o.x=275+l*(r()-.5)*200,o.y=300-l*200);for(c=9;c--;){ls(1,0,c/9);l=r()*9;lt(o.x+=l*s(o.a+=r()-.5),o.y+=l*s(1.6-o.a))}





