PDA

View Full Version : How do you add in "easing" for mouse following masking effects ?



Gabra53
September 30th, 2003, 03:41 AM
Hi all flash experts and experts wanna be out here! =)

I was actually trying to create an easing effect that bases on the movement of the mouse, very similar to:
http://www.kirupa.com/developer/actionscript/scriptable_masks.htm

but unfortunately, I really have no idea how i could actually write an actionscript to create this "esaing" ability...

I have actually attached my own file for your convience, and i really really really hope you guys could assist me in this area!

Thank you so much! ;)

eyeinfinitude
September 30th, 2003, 04:13 AM
Here's an easing tutorial that you can look at for some ideas.

http://www.kirupa.com/developer/mx/followease.htm

Gabra53
September 30th, 2003, 04:42 AM
yup, I've actually seen that site, but it actually targets an MC or in this case, the ball that follows the mouse...

In my case that i wanted to achieve is kind of complicated... I don't know am i right to say this but in my file, the masking spans from frame 1 to 100, thus in this case, how am i to apply the scripts that works for the ball to my entire mask where the only point of contact to my cursor would be the line, or edge of the mask?

Erhhh.... do you know what I'm talking about?

Voetsjoeba
September 30th, 2003, 01:43 PM
I'm not sure what you mean, but here's an example of eased masking following _ymouse:


this.onEnterFrame = function() {
if (_ymouse>=0 && _ymouse<=Stage.height) {
mask._y = ((_ymouse+mask._height/2)-((_ymouse+mask._height/2)-mask._y)/1.2);
}
};

You might wanna replace Stage.height with the absolute stage height number, because of problems in the swf preview in Flash MX. Here's a link to the file if you wanna have a look. Let me know when you've downloaded it, so I can take it off again (webspace).

http://users.pandora.be/voetsjoeba/maskease.fla

Gabra53
September 30th, 2003, 11:26 PM
Hi Voetsjoeba!

Thank you so much for your reply :)
Hummm.... I hvn't had a chance to look at your file yet (yes, i've downloaded it) due to the fact I'm running Flash 5...:P
But i'll get my hands on Flash MX soon to view your file.
(or if it isn't a problem to you, would u be so kindly as to save the file again as a flash 5 version?)

I'm so grateful for your help once again, and also so sorry to trouble you in assisting me too...

meanwhile I'll try placing the scripts to my present file and see if it works! :)

Thank youuu!!!