Play a movie clip at runtime

You can configure your document to play a movie clip at runtime. Using the attachMovie() method, you can attach an instance of a movie clip in the Library panel to the Stage even though you have not placed an instance on the Stage.

With the attachMovie() method, you must export the symbol for ActionScript and assign it a unique linkage identifier, which is different from the instance name.

  1. In the Library panel, right-click the MCTrio symbol and select Linkage from the context menu.
  2. In the Linkage Properties dialog box, select Export for ActionScript.
  3. In the Identifier text box, verify that MCTrio appears as the linkage name.
  4. Verify that Export in First Frame is selected, and then click OK.

    Movie clips that are exported for use with ActionScript load, by default, before the first frame of the SWF file that contains them. This can create a delay before the first frame plays. When you assign a linkage identifier to an element, you can specify that the movie clip load on the first frame to avoid playback delays.