Ok so i have a custom mouse on my site, and now im trying to make it so that the mouse grows and shrinks depending on where it is on the screen. Example : The mouse is at the bottom of the screen so it is bigger, the mouse is at the top of the screen so it is smaller with consistent fluctuation between. Or, The mouse is regular size at top bottom left and right and all other edges of screen, but as it moves closer to the middle it shrinks. Any help on how to do this?
Use the _ymouse and _xmouse to your advantage. Lets say you wanted your mouse to grown when you go to the bottom of the screen, it would be larger when the _ymouse is greater.
So Iโm assuming that your custom mouse is just a movieclip that is either being dragged, or continuously positioning itself at the _ymouse and _xmouse right?
So heres my example: You have a object on the screen called โcircleโ. Put this code on the frame.
circle.onEnterFrame = function(){
//---position the object to the mouse's position
this._y = _ymouse
this._x = _xmouse
//---now scale the object based on the mouse's y position
this._yscale = _ymouse * 0.5
this._xscale = _ymouse * 0.5
}
I have used 0.5 as the multiplied because didnt want it to get too big, but you can use whatever you want.
Hope this helps!