Skip to main content
Participating Frequently
April 13, 2015
Answered

How to put my character walking with keyboard keys in another frame?

  • April 13, 2015
  • 1 reply
  • 4419 views

Hello,

I'm studying multimedia and I need to do a simple game using Flash. I've seen a few tutorials about how to put a character walking and I was able to do it, but once I put the char in (for example) the third frame it doesnt walk. I have a main menu with a play button, when i click it, it goes to the third frame (where the character and the level is. I want the game to stop at that frame but at the same time be able to make the character walk using keyboard keys.

Can anybody help me? Am I doing anything wrong?

Thank you.

This topic has been closed for replies.
Correct answer Ned Murphy

I clicked the button, it went to the third frame, stopped there. The movieclip played the two frames inside of it (repeatedly) but when i used the keyboard arrows the character didn't move.


I updated my file to have the button - use the same link to get the updated version.  It still works properly.

1 reply

Ned Murphy
Legend
April 13, 2015

Which frame is the code in for the walker?  Do you get any errors?

Bruno9997Author
Participating Frequently
April 13, 2015

I put my character and the respectives codes to walk all in the frame 3. If I put stop() in the frame it stays at the frame but i can't move the character, when I remove the stop() it plays the frame and comes back to the beggining (i don't have forth/fifth/sixth frame so it passes the frame without stopping it)

Bruno9997Author
Participating Frequently
April 14, 2015

You mention Sprite... Sprites do not have a timeline so that might be part of the problem.  Convert it to a Movieclip object if you did set it up as a Sprite


I'm not sure if it is a sprite, the character is a movieclip with two frames inside of it. If i replay over and over it looks like the character is moving (in the same spot of course)