Hi,
I’ve got myself a little problem. For an website I’m working on at the moment, I made an custom mouse pointer. This worked out well, but now I want to make a little dog that attach to the pointer when I move close to the dog.
Imagine a dog sitting in the right corner of the screen, in the beginning its jumping trying to grab you’re mousepointer, and attachs to it. When you shake the mouse pointer gently, the dog needs to swing with the mouse (when I move my mouse from left to right, it needs to swing left, like its grabbing on a high speed pointer). When I shake my mouse a bit harder, the dog (movieclip) needs to fell down again on the ground.
At last, if the dog is still attached at 10 seconds after attaching to the pointer, it needs to fall down also. And only attach again if I move my mouse over the dog.
The code I used for the custom mousepointer:
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0000FF]onClipEvent[/COLOR][COLOR=#000000]([/COLOR]enterFrame[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]Mouse[/COLOR].[COLOR=#0000FF]hide[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]_y[/COLOR] = [COLOR=#0000FF]_root[/COLOR].[COLOR=#000080]yvalue[/COLOR] = [COLOR=#0000FF]_root[/COLOR].[COLOR=#0000FF]_ymouse[/COLOR];
[COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]_x[/COLOR] = [COLOR=#0000FF]_root[/COLOR].[COLOR=#000080]yvalue[/COLOR] = [COLOR=#0000FF]_root[/COLOR].[COLOR=#0000FF]_xmouse[/COLOR];
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]