How do I...?

Use an FSCommand to Trigger an Action

In AutoPlay Media Studio it is possible to trigger an action using a flash FSCommand.  This is useful if, for example, you want your application to do something specific at the end of your flash movie.

As an example, we will create a flash movie in Swish that sends an FSCommand when it is finished playing.  When the flash movie finishes playing, we will display a dialog message.

In Swish:

  1. In Swish, right click the last frame in the movie and choose FSCommand from the Context Menu.  In the Action pane, you will see the FSCommand added.

  2. Click 'FSCommand' to show the command/argument boxes underneath it.

  3. In the command box (the top of the two boxes), type the following as a command: SplashFinished.

  4. Save the movie as a swf file.

 

In AutoPlay Media Studio:

  1. Create a flash object and load the swf file that you created in Swish.

  2. Add the following Actions to the On FSCommand event (in the script tab):

if (e_FSCommand == "SplashFinished") then
    Dialog.Message("Your Title Here", "Your message here");
end

Note: e_FSCommand is a built in variable containing the last FSCommand fired within the Flash object.