Topic: tiny effect: rotating text ( using IE's Filters ) (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=29141" title="Pages that link to Topic: tiny effect: rotating text ( using IE&amp;#039;s Filters ) (Page 1 of 1)" rel="nofollow" >Topic: tiny effect: rotating text ( using IE&#039;s Filters ) <span class="small">(Page 1 of 1)</span>\

 
poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 04-21-2007 12:35 Edit Quote

Hi,

A couple of days ago, Skylined posted a 512b rotating text effect on Pouet.net.
The size seemed big to me so I had to give it a try. I managed to make my own rotating text effect in 330b.

Reaching 256b seems impossible. Still I wonder how many more bytes can be gained.

Come on, don't be shy, there's always a way to gain a couple of bytes.

e.g. the increment in a+=.52 can probably be replaced by an 1-2 digit integer. There might be some ways to rearrange the code to create some patterns that can be storred in a variable.

HZR
Paranoid (IV) Inmate

From: Cold Sweden
Insane since: Jul 2002

IP logged posted posted 04-21-2007 19:50 Edit Quote

This is 281 bytes. Works in IE6. Untested in other versions.

code:
<body onload=`C=Math.cos;a=setInterval("b='P01_ROTATOR_';for(i=0;i<12;B.innerHTML=b)b+='<p style=position:absolute;left:'+(30-11*C(a+2))+'%;top:'+(30-20*C(a-9))+'%;FILTER:progid:DXImageTransform.Microsoft.Matrix('+C(a+=.52)+','+(s=C(a+8))+','+s+','+C(a)+'>'+b.charAt(i++)",9)`id=B>


As you can see, I removed some stuff, e.g. the M11, M12 variables, that didn't seem to be necessary, but there's a chance that this makes it break in IE7 for instance. The DX, DY stuff and the width and height was also removed.
I also saved one byte by moving the id attribute to the end, without a space between the attributes

I'm pretty sure some more bytes can be saved, but as you say, 256 is probably not possible.

(Edited by HZR on 04-21-2007 19:52)

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 04-21-2007 20:05 Edit Quote

do the letters rotate individually in your version of IE6, because with your script they don't here ( IE6.0.2800.1106.xpsp2.040919-1003 )

The script is not simply moving letters along a circle, it's also rotating the letters according to their position on the curve.

Moving the ID is a nice one.



(Edited by poi on 04-21-2007 20:06)

HZR
Paranoid (IV) Inmate

From: Cold Sweden
Insane since: Jul 2002

IP logged posted posted 04-21-2007 20:17 Edit Quote

Oh, sorry, I'm stupid. I use IEs 4 Linux on Ubuntu. Those filters probably requires Windows. The fact that moving the letters around in a circle shouldn't require a filter didn't hit me. (I probably would've figure out if I'd visited the first link though).

Soo, I saved one byte. Hehe.

(Edited by HZR on 04-21-2007 20:20)

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 04-21-2007 20:25 Edit Quote

Indeed those filters only works on Windows and IE5.5+
Well that ID trick will prove handy for other 'extreme' size optimization stunts. Thanks!



(Edited by poi on 04-21-2007 20:40)



Post Reply
 
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
 
Your Text:
Loading...
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu