• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 23. Keyboard Control > Using the keypressed

Using the keypressed

Although the basic functionality of the movie is complete, you can speed up the drawing and add some keyboard functionality to improve the movie.

Do you remember how you created the script to move the robot arm in Lesson 21? There you used the stillDown to track whether the mouse button was pressed and held down. A similar function, keyPressed, is available for tracking whether a key is pressed and held down. You can use the keyPressed function to allow users to simply hold an arrow key down to rapidly move the dot.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint