ok, ill explain my problem.
this is the code im using for the background:
onClipEvent (load) {
movespeed = 8;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_x-= movespeed;
}
else if (Key.isDown(Key.LEFT)) {
_x+= movespeed;
}
else if (Key.isDown(Key.UP)) {
_y+= movespeed;
}
else if (Key.isDown(Key.DOWN)) {
_y-= movespeed;
}
}
and it works fine.
i have four seperate movie clips of a guy walking in four directions, up , down , left right. i want him to always be in the middle of the screen.
id like to make it so that when you press left, the animation of the guy walking left plays…ect.
i have this code for it:
if (Key.isDown(Key.RIGHT)) {
_root.body.gotoAndStop(“Character-right”);
} else if (Key.isDown(Key.LEFT)) {
_root.body.gotoAndStop(“Character-left”);
} else if (Key.isDown(Key.UP)) {
_root.body.gotoAndStop(“Character-up”);
} else if (Key.isDown(Key.DOWN)) {
_root.body.gotoAndStop(“Character-down”);
}
but i dont know where to put it or what needs to go before it.
thx for listening. =)<!-- / message -->