You can place buttons on the Stage in a Generator template. Actions inside the button can be specified with a variable that gets defined when the template is processed. You cannot, however, place Generator objects inside any button state, nor can you use any template command, such as Replace or Insert Symbol, to directly place a button in the generated movie.
If you want to nest a Generator object inside a button, first place the object inside a movie clip or graphic symbol, and then place an instance of that movie clip or graphic symbol inside the button by dragging it from the library to the symbol-editing window.
If you want to use a Generator object to place a button on the Stage in a generated movie, you must create a new movie clip and place an instance of the button inside it by dragging the button from the library into the Symbol Editing window. You can then use the template command to place the movie clip in the generated movie. The button functions as designed.
Guidelines for working with buttons and actions
Remember the following guidelines when working with button and actions:
![]() |
Don't use Generator objects or commands to place buttons from the library into the movie. When buttons are needed within a template, drag them from the library to the Stage or Symbol Editing window. |
![]() |
Don't assign data sources to button timelines by using the Generator Environment Variable button. See Providing data sources to Generator. |
![]() |
Don't put Generator objects directly within button states. They are not parsed and will not yield expected results. Instead, place instances of movie clips or graphic symbols that contain Generator objects or commands in the individual states of the button. These symbols are processed in an additional step and will work as expected. |
![]() |
Use GotoLabel instead of Goto Scene or Goto Frame Number whenever you are declaring a variable for the target frame. Scene names are not preserved when the Flash movie file (.fla) is exported to a Generator template (.swt), so they cannot be used to specify a target frame at run time. The Goto Frame Number field does not accept a variable. |