View Full Version : Vibrating text for menu!
chaddi
August 30th, 2003, 07:52 AM
Hello i hope someone can help me out, i saw the
http://www.kirupa.com/developer/mx/vibrate.htm
and love that effect, i want the same vibrating effect on a text for a menu, it should vibrate on mouseover :)
radicaljugnu
August 30th, 2003, 09:32 AM
Add the code in the on(rollOver) event handler i guess.
andr.in
August 30th, 2003, 10:18 AM
Use a movieclip instance for the vibrating code!
for the buttons:
on(rollOver) {
_root.what = _name;
_root.cx = _x
_root.cy = _y
_root.vibrate = true;
}
on(rollOut) {
_root.vibrate = false;
}
Put that code on every button! And then assign a unique instance name for every button!
And for the vibrating part: (put this on some kind of movieclip instance)
onClipEvent (enterFrame) {
if(_root.vibrate) {
_root.yourmovie[_root.what]._x = _root.cx+(1+Math.random()*5);
_root.yourmovie[_root.what]._y = _root.cy+(1+Math.random()*5);
}
}
Change "_root.yourmovie" to the instance name of the location movieclip where the buttons are in... and vóila!
kode
August 30th, 2003, 10:31 AM
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=21040. :P
chaddi
August 30th, 2003, 11:49 AM
thx im gonna try it out now! :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.