View Full Version : how to do the pen effect in this site
12-18-2006, 07:39 AM
can any one tell me how to guide the cursor to write the text effect that is done in this site
notice that the pen is automatically dragged from the position of the cursor to the place where the animation is to be performed...
please if anyone knows how the scripting is done tell me how.........
The only part that I personally couldn't write off the top of my head would be the script behind the drawing api. It is just drawing lines, but it's beyond anything I have tried with it yet.
Regardless of that though, the part that you are asking about is easy enough. The pen is just following the x and ymouse when you are in control of it. When you load a page that uses it for animation, it just dumps the mouse script, and tweens the pen between where it is and where it needs to be.
It would pretty much just be:
On release - change pages
On page load - get the x/y of the mouse/pen.
On enter frame - shrink the difference between the x/y of the mouse at click time, and the x/y of the pen in it's start frame, untill they match.
At the end of the animation, trigger the return trip.
12-19-2006, 12:30 AM
I worked on this a while ago, and came out with this:
They both work... I think.
12-19-2006, 08:41 AM
well as a mattter of fact those links to ur files are not working properly so i would be grateful if u send me those files as attachment in my hotmail..
I have already added u in msn...please accept the add invitation........
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.