A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [RESOLVED] unloadMovie while loadMovie on button

  1. #1
    Member
    Join Date
    Sep 2009
    Posts
    57

    resolved [RESOLVED] unloadMovie while loadMovie on button

    I am making this site that reaquires me to unload a movie when i press the button but after i need another movie to load. How do I do this. These are the two movies:

    unloadMovie:
    Photo_Holder

    loadMovie
    Thumbs_Holder

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    Something like:
    PHP Code:
    my_btn.onRelease = function()
    {
     
    Photo_Holder.unloadMovie();
     
    Thumbs_Holder.loadMovie("externalMovie.swf");

    ?

    Supposing that the movie you want to unload has been loaded inside a movie clip called Photo_Holder and the movie want to load will be loaded inside a movie clip called Thumbs_Holder and is called externalMovie.swf.

  3. #3
    Member
    Join Date
    Sep 2009
    Posts
    57
    another detail. each clip calls in an external swf.
    For example:
    Thumbs_Holder has this code

    this.createEmptyMovieClip("image", this.getNextHighestDepth());
    image.loadMovie("video galerie.swf");

    and Photo_Holder has this code

    this.createEmptyMovieClip("image", this.getNextHighestDepth());
    image.loadMovie("photo galerie.swf");
    image._x = 232.9;
    image._y = 85.3;

    Will the above code you provided still work?

  4. #4
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    Hi,

    Yes. As long as the code works in the external swf files, it will still work when these are loaded inside another movie.

  5. #5
    Member
    Join Date
    Sep 2009
    Posts
    57
    ok, I have tried this code but it did not work.

    P.S. I am using as2 not as3. oh another question, will it be easier if i just load it from the library, and how do I do this?

  6. #6
    Member
    Join Date
    Sep 2009
    Posts
    57
    If i give you a link to the file, will you see if you can fix it?

Tags for this Thread

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