adv banner
Flash & Swish  Home Flash & Swish Flash Tutorials Calling Frames in Dynamic Movie
rss

Calling Frames in Dynamic Movie

Author: Selteco.com More by this author


This tutorial was written for the Flash Designer software, which allows you to create flash animations in a much easier way than by using Macromedia Flash. You may get Flash Designer here.

Display frames of external swf file with gotoAndStop and gotoAndPlay commands

Minimum Flash Designer version 5.0.22.5.

Click to view flash
Click to view flash

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 "Item" > "Actions" > "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" > "New" 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 SWF File")
Insert the submovie into mainmovie:
  1. Go back to main movie document window
  2. Choose "Movie" > "Insert External SWF File"
  3. Type the file path "submovie.swf" (without quotes) and click OK

    image 2

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

    image 3

  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 SWF File")
  7. Choose "File" > "Export HTML 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)



Rate this Material: Bad 1 2 3 4 5 Excellent
print this page tell a friend subscribe to newsletter subscribe to rss

Add comments to "Calling Frames in Dynamic Movie"