devil78inc
10-01-2002, 05:20 PM
Hi all (again),
there's a great little menu here
http://www.ultrashock.com/cgi-bin/flas/jump2.cgi?ID=165
that i want to emulate - it basically makes a clip shake all the time, and it grows when mouseover-ed
I want to make the shake effect happen when the mouse is over and get the elastic-y effect once the user has interacted,
what i want to know is if i modify the following code so that it is within a button instance on the mc and create a loop would this do the effect i'm after?
onClipEvent (enterFrame) {
// encima -- variable
tit = 0;
for (i=1; i<=num; i++) {
d = this["c"+i];
// checar
if (d.encima) {
s = 180;
_parent.tit.tit = "item"+i;
} else {
s = 100;
tit++;
}
// mov randome
difX = (d.xF-d._x);
difY = (d.yF-d._y);
if (difX<3 || difX>-3) {
g(d);
}
d._x += difX/10;
d._y += difY/10;
d._xscale += (s-d._xscale)/5;
d._yscale += (s-d._yscale)/5;
}
if (tit != num) {
_parent.tit._visible = true;
_parent.tit._x = _parent._xmouse;
_parent.tit._y = _parent._ymouse;
} else {
_parent.tit._visible = false;
}
}
if you can shed any light i'd be very grateful
thanks in anticipation
Amir
there's a great little menu here
http://www.ultrashock.com/cgi-bin/flas/jump2.cgi?ID=165
that i want to emulate - it basically makes a clip shake all the time, and it grows when mouseover-ed
I want to make the shake effect happen when the mouse is over and get the elastic-y effect once the user has interacted,
what i want to know is if i modify the following code so that it is within a button instance on the mc and create a loop would this do the effect i'm after?
onClipEvent (enterFrame) {
// encima -- variable
tit = 0;
for (i=1; i<=num; i++) {
d = this["c"+i];
// checar
if (d.encima) {
s = 180;
_parent.tit.tit = "item"+i;
} else {
s = 100;
tit++;
}
// mov randome
difX = (d.xF-d._x);
difY = (d.yF-d._y);
if (difX<3 || difX>-3) {
g(d);
}
d._x += difX/10;
d._y += difY/10;
d._xscale += (s-d._xscale)/5;
d._yscale += (s-d._yscale)/5;
}
if (tit != num) {
_parent.tit._visible = true;
_parent.tit._x = _parent._xmouse;
_parent.tit._y = _parent._ymouse;
} else {
_parent.tit._visible = false;
}
}
if you can shed any light i'd be very grateful
thanks in anticipation
Amir