A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Controling an external .swf from my main movie

  1. #1
    Junior Member
    Join Date
    May 2002
    I'm trying to find a way to NOT go to the beginning of a loaded swf at certain times it's called up.

    I have 2 swfs, for example movie1.swf and movie2.swf. movie1.swf is on Level 0, and a button in it loads movie2, on Level 0. That part is fine.
    However, I want the button in movie1.swf to load movie2.swf , but go to and stop at a particular framelabel, in movie2.swf main timeline, named 'new work'.

    The actionscript below doesn't work (placed on the button)it just plays the whole movie:
    on (release) {
    loadMovieNum("movie2.swf", 0);
    gotoAndStop("new work");

    Both movie1.swf and movie2.swf have a small percentage preloader in their first scene.

    Appreciate any ideas...

  2. #2
    Funky Fly Flasher poyla's Avatar
    Join Date
    Dec 2000
    You could place a frame action BEFORE anything else in movie2.swf that tells it to goto whatever label you want.
    This would only make scents if your not calling movie2.swf up for anyting else, or you will have to make seperate movies for each choice you give in movie2.

    If it's small, why not just incorporate it into movie 1?

    Just a thought

  3. #3
    Junior Member
    Join Date
    Jun 2002
    The reason your current code doesn't work s because you are REPLACING movie1.swf with movie2.swf so when you call the loadmovie action the movie1.swf is obliterated and the goto line might get executed but I bet you don't have a "new work" label in movie1.swf so flash silently ignores the error and loads movie2.swf.

    Use this:
    on (release) {
    loadMovieNum("movie2.swf?flag=true", 0);

    And in a frame after your preloader in movie2.swf (gotta make sure its loaded)

    gotoAndStop("new work");

    The other option would be to load movie2.swf into level1 instead of replacing movie1.swf then you can just make it visible/invisible as needed and can tell it what to do.

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