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

Lesson 23. Keyboard Control > Using the optiondown and the stagecolor to Add Fe...

Using the optiondown and the stagecolor to Add Features

In the last task of this lesson, you will experiment with some Lingo elements that add new features to the project—and can come in handy for lots of other uses as well. The first is the optionDown, a function that determines whether the user has pressed the Alt key (Windows) or the Option key (Macintosh) and returns TRUE or FALSE. In this example, you will use the optionDown to let users press the Alt or Option key to move the drawing dot without drawing a line (by turning trails off).

The other feature you will experiment with is the stageColor, which acts as both a function and a command. As a function, it returns the current color of the stage; as a command, it sets the stage color to a particular value. In this example, you will use the stageColor to add an erase feature to the sketch toy: the user will be able to press Backspace (Windows) or Delete (Macintosh) to erase the stage.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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