A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: going from one swf to another

  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    48

    going from one swf to another

    Hello there

    In a SWF, I am loading another SWF using

    code:
     loadMovie ("denLette1.swf", 100); 



    How can I go back from the second SWF to the first SWF ? If I use gotoAndStop (1) in the second SWF this, naturally, refers to the timeline in the second SWF...

    /Donleavy

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Location
    Philadelphia, PA, USA, Earth, Sol System, Spiral Arm of Milky Way, Local Group, Virgo Supercluster, Known Universe
    Posts
    470
    If the movie that ran that command is the main movie (and not another movie loaded into a level), you can use:
    code:

    _level0.gotoAndStop(1);

    Argon Zark!, The original interactive webcomic (since 1995)

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Location
    Philadelphia, PA, USA, Earth, Sol System, Spiral Arm of Milky Way, Local Group, Virgo Supercluster, Known Universe
    Posts
    470
    Incidentally, the command to load a movie into a level should be:
    code:

    loadMovieNum("denLette1.swf", 100);


    Where 100 is the number of the level.

    loadMovie is generally used to load an swf into a movie clip.
    code:

    loadMovie("denLette1.swf", "myClipInstanceName");

    Argon Zark!, The original interactive webcomic (since 1995)

  4. #4
    Member
    Join Date
    Oct 2004
    Posts
    48
    thanks for the reply!

    I can see on the bandwidth profiler, that the _level0.gotoAndStop(1); command works, but the second SWF still stays on top of everything.

    Should I unload that in some way?

    /Donleavy

  5. #5
    Senior Member
    Join Date
    Apr 2001
    Location
    Philadelphia, PA, USA, Earth, Sol System, Spiral Arm of Milky Way, Local Group, Virgo Supercluster, Known Universe
    Posts
    470
    You can unload a level two ways. If you load something new into that same level, it will unload what was already there.

    To just unload a level use:
    code:

    unloadMovieNum(100);

    Argon Zark!, The original interactive webcomic (since 1995)

  6. #6
    Member
    Join Date
    Oct 2004
    Posts
    48
    Thank you so much!
    It works like a charm.

    /Donleavy

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