A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Unloading a movie

  1. #1
    Junior Member
    Join Date
    Sep 2002
    Posts
    17

    Unloading a movie

    Hey, I loaded a swf into a target, and I am trying to make a button that unloads itself from the target. I want to do this because when I load the swf into a target on my main swf, I lose control of all of the buttons on my main swf. I think it has something to do with the fact that the swf I'm loading has a drag action(rotating car)......anyways, can someone help me? Thanks.
    Christian

  2. #2
    iguanagirl32 mraspiller's Avatar
    Join Date
    Jul 2002
    Posts
    817
    Huh?


    Post the code you used to load the SWF...

  3. #3
    Junior Member
    Join Date
    Sep 2002
    Posts
    17

    Unloading Movie

    loadMovie("Rotating_interior.swf", "_root.excursion.interior");
    stop();
    Christian

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    _level0.myMovieClip.unloadMovie();

  5. #5
    Junior Member
    Join Date
    Sep 2002
    Posts
    17

    Unload Movie

    That didn't work. I'm not loading my swf in levels, I'm loading it into a target....but I want to unload it by calling a script from within itself. Is that possible??
    Christian

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Replace "myMovieClip" with your target's instance name!

  7. #7
    Senior Member
    Join Date
    Nov 2002
    Posts
    195
    Hi xtian1572,

    Hmmm.

    I just put together these files ...

    A mainMovie.swf which loads in an external .swf
    which has a drag action attached to it. The main
    movie also has a button.

    In this example the button on the main _level0
    timeline does not stop working when the dragable
    Movie is loaded in.

    Maybe your problem is not where you think it is.

    Also keep in mind that unloadMovie() has been known
    to "sometimes" crash the Flash player if the Movie you
    are trying to unload is still loading.

    The alternative method of unloading a Movie is to load
    a single frame "blank" .swf (less than 1Kb) into your
    movie clip instance. ie:

    loadMovie("blank.swf","container");

    I prefer this to a possible fatal crash.

    Anyway here are the .fla files ... they are really
    simple.

    Milosav
    Attached Files Attached Files

  8. #8
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    OR...
    Attached Files Attached Files

  9. #9
    Junior Member
    Join Date
    Sep 2002
    Posts
    17

    unloading a movie

    Yeah...I think you're right. My problem lies in the secondary swf that I am loading into the instance. It is a rotating car that is draggable, But I lose control of all of the buttons in main swf. Maybe you can take a look at the attached file?? (I deleted the actual artwork due to the large file size)
    Attached Files Attached Files
    Christian

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