Graphics Reference
In-Depth Information
Figure 5.27
The visual appearance of the three
button states
6. Mouse events • To display button states for the various mouse actions, set
up four mouse events for the invisible hotspot level. For the mousedown
event, the action that moves the Timeline is: sym.stop("down") ;. For
the mouseout event, the action is: sym.stop("normal") ;. For the two
events mouseover and mouseup the action is then: is ym.stop("over") ;.
If you drag several instances of the button from the Library onto the Stage
and start the composition in the browser, you already see the buttons with
the various states; however, these all have the same button text, so they are
not really usable.
7. Enter the text label • Dynamic text fields present a small dilemma. We can-
not define the actual text of each button in the symbol itself, since it would
be inherited by all instances of the button, preventing the use of buttons
with different texts in a composition. Besides symbols, Edge Animate does
not offer any direct way to set values at the instance level. We could set the
text label with symbol variables, but this is not particularly flexible, since we
first have to give each button instance a name and then manually update
all buttons in one action. This logic only affects the inner workings of the
button, and should therefore remain encapsulated so that the user does not
come in contact with the button symbols. For simple text labels, Edge Ani-
mate offers a workaround that is perfect for our project. Use the Accessibility
section in the Property panel to set the button text. When you define the
text label in the Title field for each button instance, you can get them within
the symbol definition and assign them to the text fields created earlier.
Figure 5.28
Use the Title field in the Accessibility
section to create dynamic text labels
Search WWH ::

Custom Search