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

Chapter 4. Button and Mouse Objects > Button Event Handlers

Button Event Handlers

We've already seen some event handlers. In the last chapter, we looked at the on event handler and how to use it to capture events, like users pressing buttons, and then do something, like moving to another scene.

Table 4-1. Button Properties
PROPERTY DESCRIPTION
_alpha How transparent the button is.
enabled Enables or disables a button. That is, it sets whether the button acts like a button or is completely inactive.
_focusrect Indicates whether a button with focus has a yellow rectangle around it or not (this has no effect on vast majority of Web pages).
_height The height of a button in pixels.
_highquality The rendering quality of the button, specifically, antialiasing.
_name The name of the button instance (in our example, this would be myButton, but1, or but2).
_parent Refers to the movie clip that contains the button.
_quality Refers to rendering quality of the movie (more global than _highquality).
_rotation The amount the button is rotated, in degrees.
_soundbuftime The number of seconds for a sound to preload (many buttons have small sounds attached to them).
tabEnabled Indicates whether a button is a part of automatic tab ordering (this doesn't work consistently; don't depend on it).
tabIndex Sets the tab order of a button.
_target The target path of the button. This is in ancient slash notation, instead of the current dot notation, so feel free to skip this property.
trackAsMenu Indicates whether other buttons can receive mouse release events. If you're in a hurry, skip this and just use components.
_url The URL of the SWF the button is in.
useHandCursor Sets whether the hand cursor appears when the cursor is over the button. If you want users to actually press the button, I recommend keeping the hand cursor.
_visible Whether the button is visible or not. If it's invisible, then it can't be pressed.
_width The width of the button in pixels.
_x The horizontal position of the button.
_xmouse The x-coordinate of the cursor relative to the button.
_xscale The horizontal width of the button as a percentage. Default is 100.
_y The vertical position of the button.
_ymouse The y-coordinate of the cursor relative to the button.
_yscale The vertical width of the button as a percentage. Default is 100.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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