You can make a Generator object the target of an action. All Generator objects, except the Insert Sound command, have an Instance Name parameter. You make a Generator object the target of actions by using the Instance Name parameter and specifying an action that references it.
The following example shows how to make a Generator object the target of actions. You create a button that stops a movie when selected.
To use the Insert Movie command's Instance Name parameter for actions:
1 | Double-click Insert Flash Movie in the Generator Objects palette. |
2 | In the Generator inspector, specify any SWF file for the File Name parameter. |
3 | Type hello for the Instance Name parameter. |
4 | Create a button with the following actions: |
Create a TellTarget action, with the target name as hello. Create a Stop action inside of the TellTarget action. The button actions should look like this: | |
On (Release) Begin Tell Target ("hello") Stop End Tell Target End On |
|
5 | Preview the movie with Generator enabled. |
![]() |
In the preview movie, if you click the button you created, the action is applied to the target, hello.
The following example shows how to use a movie clip symbol that is contained in a Generator object as the target of actions.
To use a movie clip inside of a Generator object for actions:
1 | Double-click Plot in the Generator Objects palette. |
2 | In the inspector, specify obj for the Instance Name parameter. |
3 | In the data source of the Plot command, use the column names Clip, x, y, and instancename. For the Clip column, specify a movie clip symbol name. Specify any x and y values you want. For the instancename column, specify target1. (You can give any name to make this symbol a target of actions.) |
4 | Create a button with the following actions: |
Create a TellTarget action, with the Target name obj/target1. Make sure you use the forward slash to specify the path hierarchy. Create a Stop action inside of the TellTarget action. The button actions should look like the following: | |
On (Release) Begin Tell Target ("obj/target1") Stop End Tell Target End On |
|
5 | Preview the movie with Generator enabled. |
![]() |
In the preview movie, if you click the button you created, the action is applied to the target, target1.