Selteco.com > FlashDesignerZONE.com > Tutorials > T1045

Calling frames in dynamic movie

Display frames of external swf file with gotoAndStop and gotoAndPlay commands

Minimum Flash Designer version 5.0.22.5.

Create main movie:

  1. Create a new document and set the size to 500 x 400 ("Frame" > "Frame Size")
  2. Set "Frame 1" to "Stop" ("Frame" > "Frame Delay" and check "Stop", click OK)
  3. Draw a button and name it "Frame 1" (double-click the button to rename it)
  4. Choose "Action" > "OnClick", check "ActionScript" and type:

    submovie.gotoAndStop("Frame 1");

  5. Copy the button 2 times and rename the copies to "Frame 2" and "Frame 3"
  6. Modify the actionscript for each button to submovie.gotoAndStop("Frame 2"); and submovie.gotoAndStop("Frame 3"); respectively
  7. Save the file for later as "mainmovie"
Now create the sub-movie:
  1. Create a new document and set the size to 400 x 250 ("Frame" > "Frame Size")
  2. Set "Frame 1" to "Stop" ("Frame" > "Frame Delay" and check "Stop", click OK)
  3. Create text "Frame 1" on Frame 1, copy the text to clipboard ("Edit" > "Copy")
  4. Choose "Frame" > "Insert" twice to add Frame 2 and Frame 3
  5. Paste the text on Frame 2 and Frame 3 and modify it to "Frame 2" and "Frame 3" respectively.
  6. Save the file as "submovie" ("File" > "Save As")
  7. Export the movie as submovie.swf and put it on your desktop ("File" > "Export Flash SWF File")
Insert the submovie into mainmovie:
  1. Go back to main movie document window
  2. Choose "Insert" > "Flash"
  3. Type the file path "submovie.swf" (without quotes) and click OK

  4. Choose "Item" > "Placement Properties" and rename the item to "submovie" and check "ActionScript Target", click OK

  5. Choose "Item" > "Resize" and resize the movie to 400 x 250 (uncheck "Keep proportions")
  6. Export the main movie and put it on your desktop ("File" > "Export Flash SWF File")
  7. Choose "File" > "Export Web Page", the page should popup in a browser window
  8. Click "Frame" buttons to test the sub movie .

Note: the sub movie doesn't work in preview mode, only in HTML page. The sub movie must be available at the same path as the main movie. You have to upload both swf file to your web site.

Download source project t1045.zip (1 kb)

Products | Purchase | Downloads | Support | Flash Tutorials | Contact
Copyright © 1999-2017 Selteco Software, Inc. www.selteco.com, ph: +1 810 377 5778