A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Working with SWF embedded in an SWF

  1. #1
    Junior Member
    Join Date
    Jul 2000
    Location
    Savannah, GA, USA
    Posts
    29
    I have an swf file that I put into the first scene of a movie I am working on. It's basically an intro scene (all animation). The SWF file, called intro.swf is 500 frames. I can get it to play fine inside my movie (called home), but I have a slight problem.

    The way I put intro.swf into my movie is by making a new scene in "home" calling that scene "intro". I used the load movie commmand in frame 1 to get the swf to play, then added 500 frames to the "intro" scene so it would play ALL of intro.swf without going on to the next scene before intro.swf was done.

    Like many other intros, intro.swf has a "skip" button in it. The problem is, how does my main movie know when the "skip" button is pressed inside intro.swf. Somehow I need to communicate to the main movie and say, okay, the user pressed skip, so go on ahead to the next scene. I tried putting "stop" as the onmouseevent for the skip button. All that did was stop intro.swf. My main movie, still in the "intro" scene, kept going until is reached its 500 frames.

    Help me.

  2. #2
    You shouldn't need to put 500 frames in your main movie, just to play a child movie! You probably haven't checked the movie property in the object property box. Do this first. The rest will follow. Look for tuts in your Flash package.
    Maybe someone else will come and help you better...

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    124

    Here you go.

    All you will need is one single frame in your new scene1 to make this work.

    Frame 1 of Scene 1 will have both a "Stop" action and a "Load Movie" action in it.

    Stop
    Load Movie ("external.swf", 1)

    Then, on the last frame of the loaded movie, put the following action script.

    Unload Movie (1)
    Begin Tell Target ("_level0")
    ....Go to Next Frame
    End Tell Target

    This will cause the loaded external movie to unload itself when it's done playing and then send your main movie to the next frame (next scene).

    Hope This Helps,

    Generator

  4. #4
    Junior Member
    Join Date
    Jul 2000
    Location
    Savannah, GA, USA
    Posts
    29

    thanks!

    I got it to work. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center