At 6/22/03 03:21 PM, Star_Cleaver wrote:At 6/22/03 03:13 PM, Russian_Mobster wrote: hey ppl how do i make my character go left when i press left and use the good animation the same for right! plz help i tried another script but that one had errors!onClipEvent (keyUp) {
_root.walk.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_root.walk.play();
_root.walk._x -= 15;
_root.walk._xscale=100
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_root.walk.play();
_root.walk._x += 15;
_root.walk._xscale = -100;
}
}
name yoru MC of your guy walking, "walk" and then inside the MC on frame 1 put a stop() command and then on the last frame of the actual walking animation put
gotoAndPlay(2);
assuming 2 is the first frame of your walking sequence.
hope that helps
-Star_Cleaver
thanks a lot!.first it didn't work but later it worked!!
Note to all newbies: when ppl ask you to name your mc something. they don't mean the name when you convert it to a mc but they mean the instance name wich you can find in the properties window! that was my mistake
Russian_mobster