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

Chapter 14. CREATING BEHAVIORS > CREATING A SIMPLE BUTTON BEHAVIOR

CREATING A SIMPLE BUTTON BEHAVIOR

A simple button behavior should do several things. First, it should make the sprite switch members when users press it. This “pressed” version of the sprite is called the down state. Second, it should recognize the difference between the mouse being released above the sprite and it being released outside the sprite. This enables the users to click down, but then move the mouse so that it doesn't activate the button when it's released. Third, the button should perform a task, such as simple navigation, when there is a successful button press.

A behavior such as this should have two parameters. The first is a property that determines the down state of the button. The second defines what the navigation function of the behavior should be. Here is the on getPropertyDescriptionList handler for this behavior:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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