milov.nl

Interaction design • webdevelopment • web art • photography

February 2002

Working on my final entry (of 5) for the 256b.htm Compo. Deadline is tomorrow night. It's insane the tricks one resorts to when trying to fit something in 256 bytes. A little sample:

onmousemove="e='.style.border=event.client';eval
('a'+e+'X%200+(d=\' '+['dashed','groove','dotted'][b.s
%3]+' #666\');b'+e+'Y%200+d')"



23JUL wrote on 2002/02/27:
Ever tried to read/use the document.URL? ;)


milov wrote on 2002/02/27:
supposedly, that's not allowed...
not that I'd need to - already managed some fast, fullscreen, varied, detailed, interactive animations within the limit.


milov wrote on 2002/02/28:
btw, are you submitting anything? 256byte 'life' perhaps? :)


mados wrote on 2002/02/28:
Milov, replace '\'' with "'" and save two bytes! Also the a?b:c statement is very usefull sometimes.

"... d"+(b.s%2?'ash':'ott')+"ed ..."


mados wrote on 2002/02/28:
Ouch, the quote thingy above doesn't work. Try to replace onmousemove="..." with onmousemove=...


mados wrote on 2002/02/28:
Did your "dhtml Colour Picker" in 198 byte. ;-)

<body id=b onmousemove=y=event.clientY*2/b.clientHeight-1;x=event.clientX*6/b.clientWidth;a=[1,1-x%1,0,0,x%1,1];b.bgColor='rgb('+(a[i=x-x%1]-y)*255+','+(a[(i+4)%6]-y)*255+','+(a[(i+2)%6]-y)*255+')'>


milov wrote on 2002/02/28:
mados: i couldn't remove the " " around the onmousemove-param because there's a space before #666.
great work on the colour picker!


itodd wrote on 2002/03/01:
man, there are other browsers besides ie :(


mados wrote on 2002/03/07:
Yes, there are. But in "size coding" you have to decide on one browser.