Scripting an animation in Adobe Illustrator CS2
(this is from my old blog)
A few months ago I needed to implement a small loading animation (similar to the typical “AJAX”/Firefox circle animations seen in most RIA apps). As the IPTV platform I’m working on doesn’t support animated gifs, I had to develop my own “format” in JavaScript. This turned out to be a pretty slick component so I included it into our component library.
var i = 0;
do
{
var layer = document.layers[0];
layer.name = "frame"+i;
for(var j=0; j<settings.n; ++j)
{
var angle = step*j;
var radius = rs[j];
var x = settings.x+Math.cos(angle)*
settings.pathradius-radius;
var y = settings.y+Math.sin(angle)*
settings.pathradius+radius;
var circle = layer
.pathItems.ellipse(x, y, radius*2, radius*2);
circle.stroked = false;
circle.fillColor = settings.colorfn(i,j);
}
if(settings.colorfn == colorTail)
{
var e = fgtable.pop();
fgtable.unshift(e);
}
i++;
if(i<=settings.n) document.layers.add();
} while(i<=settings.n)
To accompany my “FrameAnimation” component I wanted to create a few reference animations and started drawing a few circle animations in Adobe Illustrator. But as manual labour isn’t my thing
, I of course has to create a script for generating the induvidual frames and then another for saving each frame as a PNG.
Downloads the source files:
2 Responses to Scripting an animation in Adobe Illustrator CS2
Leave a Reply Cancel reply
SeoTools for Excel
FACEBOOK









I am trying to get Google Page Rank values in excel. I have downloaded SeoTools-v1.4 but the functions doesn’t seem to work despite enabling the plugin (Office 2007) and calling up the function. I even used your “IsDomainRegisteredExample.xlsx” but a refresh on that page bring up “#NAME?” error in boxes where you have values.
Please help.
Are you following the guide for using the plugin properly? Even if you open “IsDomainRegisteredExample.xlsx” you still need to add the plugin to the session.