On the comunities link, there is a little red icon of a guy getting shocked. Its on the left side of the page. When you move your mouse towards him, he flies away! How do you do this? Also, how does it reappear on the other side of the page when its pushed off? help?
It’s quite simple. It’s an animation that is stoped at first. When you click the button it plays the animation and when it ends it is rewinded and it waits for another click.
thas kinda fun!
the man is a movieclip which uses some sort of easing where the end point is updated depending upon where the mouse is in relation to the center of the movieclip…
off the top of my head i would say it uses some sort of trig equation to work out where to go… and the way it disappears and reappears is simple.
if(this._x<0){
this._x=450
endX=450-endX
}
etc etc
Prophet.