At 6/19/03 06:57 PM, Sub7Ecstacy wrote:
I have a sequence of frames in a MC of my character walking. The onlytime i want the MC of him walking to play is when someone controls him with the left or right keys. Can anyone help me?
thats wat i was wanting to do b4. heres the code i used.
first inside the MC of your person make an MC or the person walking left in frame 2, an MC of the person walking right in frame 3 and a person standing still in frame 1. then add this code to the MC.
onClipEvnet(enterFrame){
//Move Left
if(Key.isDown(Key.LEFT)){
gotoAndStop(2);
//Move Right
}else if(Key.isDown(Key.RIGHT)){
gotoAndStop(3);
//Standing Still
}else if(!Key.isDown(Key.LEFT)){
gotoAndStop(1);
}else if(!Key.isDown(Key.RIGHT)){
gotoAndStop(1);
}
}
that should do the trick. it worked for me.
Now i need some help (sorry if this is getting annoying but im learning heaps).
ive got my guy to teleport to the oposite side of the screen wen he reaches the edge, now all i need is for the Background MC to go to the next frame wen he reaches an edge, can anyonw be of any help on this problem?