How do I...
How do I...
- Started
- Last post
- 5 Responses
- rasko4
this makes the movieclip slide with the direction of the mouse, how do I make it go in the opposite direction?
onClipEvent (load)
{
xcenter=130;
speed=1/30;
}
onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
}onClipEvent (enterFrame)
{
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
if (_x > 0) _x=-926;
if (_x < -926) _x=0;
}
- save0
bugger!
- ozhanlion0
+=
to -= maybe.
- ganon0
_x -= (distance*speed);
- unfittoprint0
try making
distance = -(_root._xmou se-xcenter);
- rasko40
ah yes, I am a dullard today.
thanks :)