IE6 FIX
Again, thanks a lot!
Just a little remark this time:
instead of calling activeDocument.getSelectedItems() and then checking for Paths, you could do:
activeDocument.getMatchingItems(Path, { selected: true });
As this is not really documented yet it is impossible to know abou tit. This is soon going to change...
Just a little remark this time:
instead of calling activeDocument.getSelectedItems() and then checking for Paths, you could do:
activeDocument.getMatchingItems(Path, { selected: true });
As this is not really documented yet it is impossible to know abou tit. This is soon going to change...
IE6 FIX
is it possible to randomize the colour of objects out of a list of pre-created colours?
something like this?
http://workshop.joshuadavis.com/001/001-hidden-canvas/
something like this?
http://workshop.joshuadavis.com/001/001-hidden-canvas/
IE6 FIX
var colors = [
new RGBColor(0,0.5,1),
new RGBColor(1,0,0),
new RGBColor(0,1,0),
new RGBColor(1,0,0),
new RGBColor(0,0,1)
];
var sel = activeDocument.getMatchingItems(Path, { selected: true });
for (var i = 0; i < sel.length; i++) {
art = sel[i];
var color = colors[Math.round(Math.random()*(colors.length-1))];
if (art.style.stroke.color != null) art.style.stroke.color = color;
if (art.style.fill.color != null) art.style.fill.color = color;
}
If you want to work with CMYK colors use: new CMYKColor(c,m,y,k) instead of new RGBColor(r,g,b)
Scripts
13.10.08, 01:28
03.10.08, 00:01
18.09.08, 20:43
16.09.08, 21:36
14.09.08, 18:50
Posts
03.01.09, 20:57
02.01.09, 20:40
29.12.08, 18:05
29.12.08, 10:20
27.12.08, 14:28
Example of the Moment
Donation