#1
  1. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2002
    Location
    Seattle, U.S.A.
    Posts
    712
    Rep Power
    13

    loading a .swf from inside another movie


    I'm trying to load a short movie from inside my main movie and then have it disappear when the user clicks on it. I have code that loads it up fine, but I can't get the main program to recognize any click events. This is what I have so far:

    **************
    this.createEmptyMovieClip("error_mc", 1);
    this.error_mc.loadMovie("error.swf");
    this.error_mc.onRelease = function(){
    error_mc.unloadMovie();
    }
    *************

    Any ideas on how to make the loaded .swf recognize click events to that it can be unloaded?

    thanks.
  2. #2
  3. No Profile Picture
    flash junkie
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    CO, USA
    Posts
    172
    Rep Power
    12
    an easy fix would be to just put the onRelease code in your external movie.

    this.onRelease = function(){
    this.unloadMovie();
    }

    and you wouldn't even need your main movie to have to watch or look for any events.

    cheers,

    bret
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2002
    Location
    Seattle, U.S.A.
    Posts
    712
    Rep Power
    13
    Thanks Bret,

    That did the trick! Appreciate the help again ...

    MS

IMN logo majestic logo threadwatch logo seochat tools logo