Using the Symbol Editor > Using More Features of the Symbol Editor > Working with Interactors > Creating a Push Interactor

A push interactor is used to change the appearance of one or more objects when a mouse event occurs. By default, a Push interactor intercepts three mouse events: PRESSED, RELEASED and CLICKED. Depending on whether the mouse is over the symbol or out of the symbol, when the event occurs, the following values that represent the state that the object are passed to conditions:

These events fulfill conditions attached to one or more objects in the symbol. An example is a button that changes color when clicked. To add a push interactor to a symbol, do the following:

  1. In the Symbol Editor, create a new symbol. For more information, see Making a New Symbol.
  2. Create a String parameter click. This parameter holds the string value of the mouse event.
  3. Select the Shape object.
  4. Select the Interactor tab in the Styling Customizer.
  5. Select Push in the Interactor field. Three new conditions are created under the Shape object in the Symbol Outline pane.

images/diasym_interactorpush.png

Figure 2.15 Automatic Parameters for a Push Interactor
  1. Select the BUTTON_DOWN condition in the Symbol Outline pane.
  2. Select the Paint tab in the Styling Customizer.
  3. Click the button at the right of the Fill Paint field. The Paint Editor opens.
  4. In the Radial Gradient tab, change the gradient type from Pad to Reflect.
  5. Click Apply.
  6. Save this symbol as basicbutton in a new buttons category in the bampalette.

When you run this symbol in Preview mode, the Shape object changes color when it is clicked.

Note
You do not have to customize all three automatic push conditions. Delete the conditions you do not use.