6 Replies Latest reply on Feb 18, 2007 4:00 PM by descente

    how to disable background movie

    descente
      I’m building a photo gallery in flash. I have a main movie(call it parent movie if you want) which has a collection of small thumbnails of photos. I click on the small thumbnails to enlarge the photos. It's actually loading(targetMC) a child movie contains the enlarged photo. The main movie(parent) will be screened back and disabled. There’re two buttons (previous and next) in the enlarged mode. So the user can still click forward or backward without going back to the parent movie. When the user clicks the enlarged photo itself, it closes the child movie and goes back to the active parent film. I used targetMC to do this, but I seriously doubt this is the right approach. It may not need child movies at all because if I have 100 photos on the main movie, I'll have to make 100 individual child movies: totally screwed. Can anyone give me an advice on how to build something like that?

      Thanks a lot.
        • 1. Re: how to disable background movie
          kglad Adobe Community Professional & MVP
          there's no issue using a child movieclip as that target of your enlarged pic loads except it might impact performance if you have hundreds of them. so, just create them during runtime when they are needed and use removeMovieClip() to unload the enlarged pic and remove the child movieclip.
          • 2. Re: how to disable background movie
            descente Level 1
            but how do I disable the parent movie when the child movie is loaded? thanks.
            • 3. Re: how to disable background movie
              kglad Adobe Community Professional & MVP
              you can use the enabled property of movieclips to enable/disable movieclips.
              • 4. Re: how to disable background movie
                descente Level 1
                quote:

                Originally posted by: kglad
                there's no issue using a child movieclip as that target of your enlarged pic loads except it might impact performance if you have hundreds of them. so, just create them during runtime when they are needed and use removeMovieClip() to unload the enlarged pic and remove the child movieclip.


                I was trying with removeMovieClip() in the childmovie. Basically, I made the enlarged photo into a button, and used on release: removeMovieClip(this), but it didn't work.

                Also, I couldn't find the disable handler under the setProperty. I though if I add setProperty(disable) to the thumbnail button after loadMovie(child movie), it should disable the parent movie.
                • 5. Re: how to disable background movie
                  kglad Adobe Community Professional & MVP
                  try: assuming your movieclip was not created in the authoring environment using this.removeMovieClip() will work. otherwise, you need to use swapDepths() first to move your movieclip to a removable depth.

                  help for the enabled property is under the movieclip class and button class.
                  • 6. Re: how to disable background movie
                    descente Level 1
                    quote:

                    Originally posted by: kglad
                    try: assuming your movieclip was not created in the authoring environment using this.removeMovieClip() will work. otherwise, you need to use swapDepths() first to move your movieclip to a removable depth.

                    help for the enabled property is under the movieclip class and button class.


                    What you mean by "not created in the authoring enivonment"? The child movie is a swf file which contains the enlarged photo(I made it into a button, and tried to assign the unload function to it upon clicked).