Monday, April 26, 2010

Line Kaleidoscope generator

Line Kaleidoscope generator is a fun-to-play generator for Kaleidoscope graphics. No generated graphics can be saved, or even fixed on the screen, but the animations are truly fun to look at.
The script for the Kaleidoscope generator is also kindly published in the above page.

The image below is a screen dump when moving the mouse cursor in a circular movement.

And one more try by changing the background to black.

For curious people, quote the script (which is its old version) as below.
onClipEvent (load) {
x=0 //where the dot is
y=0 //where the dot is
xmove=0 //it's movement
ymove=0 //it's movement
}
onClipEvent (enterFrame) {
xmove+= (_root._xmouse-_x-x)/10 //math
ymove+= (_root._ymouse-_y-y)/10 //math
x+=xmove+(_root._xmouse-_x-x)/10 //math
y+=ymove+(_root._ymouse-_y-y)/10 //math
clear()
lineStyle(1,000000,100)
moveTo(oldx,oldy)
lineTo(x,y)
oldx=x //this is so that in the next frame it knows where the dot was last frame
oldy=y //this is so that in the next frame it knows where the dot was last frame
_rotation-- //This is negative on two of the movieclips (that initially have an opposite rotation to eachother), and positive on the other two.
}

No comments:

Post a Comment