Creating Interactive Animations With "Event" Trigger

Legacy Article: This article covers the legacy FMBooth (Windows + iPadOS) software. FMBooth (Windows + iPadOS) has been replaced by FMX. See FMX documentation →

Overview

This guide explains how to properly edit a .SWF file to utilize the "Event" trigger functionality for interactive animations in Foto Master software.

Key Limitation

The "touch" trigger won't work for elements that are imported as "Movie Clips." Therefore, you must follow specific steps to enable event-based interactivity.

Steps to Create Event-Triggered Animation

1. Prepare the Layer Structure

  • Create a new layer on top of your timeline
  • Design a shape in the area where you want to activate touch interaction
  • Press F8 to convert the shape into a movie clip
  • Assign a descriptive name to the shape object

2. Configure Symbol Properties

Ensure you update the symbol name in the properties window (this is critical for the code to recognize your element).

3. Add ActionScript Code

  • Create an additional layer above your shape layer
  • Press F9 to open the script action panel
  • Input the following code:
import flash.events.Event;
import flash.events.MouseEvent;
my_btn.addEventListener(MouseEvent.MOUSE_DOWN, onMouseClick);
function onMouseClick(event : MouseEvent) : void
{
dispatchEvent(new Event("nextStateEvent",true));
}

4. Customize the Code

Replace my_btn with the actual name you assigned to your shape object in step 1.

Result

Once configured correctly, your animation will respond to touch/click events as intended.

Related articles