2 Replies Latest reply on Jul 26, 2007 11:55 AM by jl2000

    unloadMovie to a specific frame

    jl2000 Level 1
      Hi -
      I have a master.swf with a btn that uses loadMovie to bring in INSTR.swf which completely fills the screen. Then theres a button on INSTR.swf that unloads itself and then brings back the master.swf into the same level. ( It works but if theres a better, cleaner, safer way - please let me know.)

      But whenever master.swf is re-loaded it starts on frame 1 and I want it to start on frame 5.

      Is there a way to do this?

      Thanks for your help,
        • 1. Re: unloadMovie to a specific frame
          Level 7
          I would do this:

          1. In master.swf, create an empty movieClip.
          2. Place an instance of this clip in the top layer of your timeline at
          frame 1. Place it at the upper left corner of the current stage area.
          Give it an instance name, say, "instrHolder".
          3. for the button to bring up the instructions, use this:

          btn_showInst.onRelease = function():Void {

          4. To remove the instructions movie use this code for the button in the
          instructions movie:

          Home_btn.onRelease = function() {

          If you load in the instructions movie on top of the master movie, then
          you don't need to load master in again. The first time master runs it
          will work as expected, load in instr.swf when its button is used. When
          the button from the instr.swf is used, it will unload that movie and
          tell master.swf to show frame 5.

          If you think that you will be using instr.swf more than a few times and
          it is a large file, then you may want to load it at the start of
          master.swf and hold it off the visible area of the stage until you need
          to show it. Then move the clip in to view, and back out of view when you
          don't need it.


          Rob Dillon
          Adobe Community Expert
          • 2. Re: unloadMovie to a specific frame
            jl2000 Level 1
            Rob -
            Thanks! That worked perfectly. I can see I'll be using that a million times.