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

Adding a Button

The Button component is a clickable rectangular button, which can be resized. If you desire, you can add a custom icon to the Button component. In addition, you can change the behavior of a Button component from push to toggle. A toggle button stays pressed when clicked and returns to its up state when clicked again. All of these options are accomplished through the Component Inspector panel.

Add a Button Component

Open the Components panel.

Click the UI Components Expand triangle.

Drag the Button component onto the Stage, and then select the component.

Open the Component Inspector panel, and then select the Parameters tab.

Select from the following Button parameters:

  • icon. Click the value field, and then enter the full path name to an icon file.

  • label. Click the value field, and then enter a label for the Button component.

  • labelPlacement. Click the value field, and then select between right, left, top, or bottom for the placement of the Button component text.

  • selected. When you click the value field, and select true, the button appears selected. If you select false, the button is normal or deselected.

  • toggle. When you click the value field, and select true, the button, when selected returns a true value. If you select false the button returns false when selected.

  • enabled. When you click the value field, and select true, the button can be clicked. If you select false, the button is grayed out and cannot be clicked.

  • visible. When you click the value field, and select true, the Button can be viewed. If you select false, the Button is invisible.

  • minHeight. Click the value field, and then enter a minimum height for the Button.

  • minWidth. Click the value field, and then enter a minimum width for the Button.

Click the Control menu, and then click Test Movie.

When you click the button, it changes color; just like a typical rollover button. You could now attach an ActionScript to the button to load another scene or movie.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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