all groups > flash actionscript > november 2004 >
You're in the

flash actionscript

group:

Easing menu


Easing menu klick
11/16/2004 10:00:11 PM
flash actionscript:
I know you can create a growing button using ActionScript, but I cant seem to
remember what it is. An example of it is http://www.subblue.com/home.php,
rollOver the bottom section 'Portfolio' or 'information'. Thanks in advance.
Re: Easing menu NSurveyor
11/17/2004 12:22:37 AM
Here is a script you can use. I probably used lousy Actionscripting. So if any
of you other people have a better way, post it. Attach Code grow(mc_path,
pgpm, stopatwidth); //-mc_path is the path to the movieclip. //-pgpm is how
many pixels the movieclip // will get bigger per millisecond //-stopatwidth
is how big the width of the movieclip should // ultimately be. //DO NOT CHANGE
ANYTHING BELOW, UNLESS YOU WANT //TO CHANGE HOW THIS WORKS. function
growpixel(mc_path, pgpm, stopatwidth) { mc_path._width+=pgpm;
mc_path._height+=pgpm; if (mc_path._width > stopatwidth) { mc_path._height
-= mc_path._width - stopatwidth; mc_path._width = stopatwidth; } if
(mc_path._width == stopatwidth) { clearInterval(myInterval); } } function
grow(mc_path, pgpm, stopatwidth) { myInterval = setInterval(growpixel, 1,
mc_path, pgpm, stopatwidth); }
AddThis Social Bookmark Button