Now: Tutorial for Web and Software Design > Flash > Flash Video > Flash Content
> Calling Frames in Dynamic Movie [Bookmark it]
Calling Frames in Dynamic Movie

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)


[Bookmark][Print] [Close][To Top]
  • Prev Article-Flash:

  • Next Article-Flash:
  • Related Materias
    E-card Announcement
    Cursor Follower
    Creating the Illusion of S
    Flash 8 Tutorial - Shape T
    Controlling File Size in F
    Smooth Scrollbar
    Simple Authentication Syst
    Controlling File Size in F
    Dynamically Attaching Comp
    Mouse Follower in Flash
    Topics
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Graphic Design Tutorial
     

    Coreldraw Tutorial

      Illustrator Tutorial
      3D Graphics Articles
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial&Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial&Articles
     

    XML Style Tutorial

      AJAX Tutorial
      XML Mobile
    Flash Tutorial&Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial&Articles
     

    Linux Tutorial

      Symbian Tutorial
      MacOS Tutorial