PDA

View Full Version : mx scale on rollover


devil78inc
09-30-2002, 04:26 PM
Hello everyone,

basically i'm aiming to create a small text menu that when the mouse is placed over it it will scale up and i think i'm going to add some elasticity to it also, but i don't understand why my scaling won't increment.

I'm using the following code:

on (rollOver) {
insname._xscale = insname._xscale+10;
insname._yscale = insname._yscale+10;
if (insname._xscale>=200) {
insname._xscale = 200;
}
if (insname._yscale>=200) {
insname._yscale = 200;
}
}


and reversing the process for the rollOut, it only scales up first of all and i have to repeatedly roll the mouse over the mc to get this to happen.

I know that i've got the same principle working (to slide images along the x axis on a ClipEvent) but don't understand why i can't get it working with this - once i've done this i think i can get the elasticity working (fingers crossed!)

I'd appreciate if someone could show me the error of my ways, i've had real trouble concentrating this monday....

thanks in anticipation

flx
09-30-2002, 05:14 PM
from what i can see the code looks fine.. all but a missing and very vital element... a loop of some kind.
For the sliding along the x-axis you have it set in an OnClipEvent which automatically loops.. whereas for the button it looks like you've just added the code to the OnRollOver function. If this is the problem i'm sure u know what to do... :)

If not this is what i did once (well kinda what i did):
->have a movieclip.

-1st frame had a button with a RollOver functions set to play.
-2nd frame had the code which you have already made.
-3rd frame had a 'goto' statement which set the playhead back to frame to and "voila" theres ur loop.

Simple!

Hope this was helpful...

devil78inc
10-01-2002, 08:10 AM
Thank you!

I knew it was simple, and today i'm feeling a lot more refreshed, so i'm ready to rock again.

Mucho thanks

ramirez