Skip to main content
Participant
January 29, 2014
Answered

How to have the spacebar do one thing on one frame and a different thing on a over?

  • January 29, 2014
  • 1 reply
  • 264 views

I am making a game using flash, and I would like it so you could use the spaebar to skip the story. But the spacebar is also the characters ablity. How is this possible to do. Whenever I try I get lots of errors.

I am new to action script 3, please be kind.

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

One way would be to have a conditional that tests takes actions depending on which frame the file is currently in.

Another way would be to remove the listener for the keyboard for the first functionality and add a new keyboard listener when you want the different functionality.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
January 29, 2014

One way would be to have a conditional that tests takes actions depending on which frame the file is currently in.

Another way would be to remove the listener for the keyboard for the first functionality and add a new keyboard listener when you want the different functionality.