Graphics Reference
In-Depth Information
5.2.1 Responding to Events
To understand better how to deal with events, we are reproducing the logging
example in which the composition event compositionReady and the user
event click are used. In response to the events, a text output will be displayed
in the console. To listen to an event in Edge Animate, directly select the element
on the Stage and then choose Open Actions for XYZ in the right-click context
menu.
Figure 5.3
Dialog for opening the Code panel to
create actions for a particular element
In addition, the Edge Animate user interface contains three different double
curly braces ({}) that can be used to access the Code panel for events and ac-
tions. If the braces are empty, no code has been created. If the braces are filled
in, actions for at least one event have been created.
When you open the actions with the right-click menu or the curly braces icon,
the Code panel for actions opens. Initially, it only contains the message, “add an
event to start coding.” Note that the Code panel for actions only applies to the
selected element. Since the Stage is ultimately an element or symbol, the Code
panel for actions is opened for the Stage if no specific element is selected. Before
we can start writing actions, we must first define which event will trigger the
action. Use the + icon in the upper left corner to see the available events for the
selected element. The following figure shows an example of the possible events
for the Stage.
 
Search WWH ::




Custom Search