Skip to main content
Participant
June 7, 2020
Frage

Adding keyboard controls to a sprite

  • June 7, 2020
  • 1 Antwort
  • 235 Ansichten

Hi everyone. I made a few games years ago on Actionscript 2, but have no idea why my codes arent working to move my character.

 

I have made them a symbol with each animation (facing left, facing right, walking left, walking right, jump right, jump left) all in the one symbol and labelled each on a seperate layer in the symbol. layer one has the motion tween for each, layer 2 is labelled and has the action this.gotoAndPlay("standright") or this.gotoAndPlay("jumpright"). The default is standright.

 

When I add the action script snippet for move with keyboard arrows to my character, she does not move. 

 

I need help making her work and make it so she faces left when walking left, faces right when walking right, etc...

 

Please help me out.

    Dieses Thema wurde für Antworten geschlossen.

    1 Antwort

    kglad
    Community Expert
    Community Expert
    June 7, 2020

    what's the code that doesn't (seem) to work?

    do you see any errors when testing?