3 Replies Latest reply on Aug 2, 2006 9:33 AM by Newsgroup_User

    movie clip loader

    dc12 Level 1
      Hi,
      I am using 2 movie clip loaders - one to load jpg's and one for external swfs.
      They are both working but.....when i'm on the photo section, and try and load an external swf, the swf loads, but the photo doesn't go away.
      What code do I use??
      Thanks!!!
        • 1. Re: movie clip loader
          Level 7
          "dc12" <webforumsuser@macromedia.com> wrote in message news:eaofho$nbh$1@forums.macromedia.com...
          > Hi,
          > I am using 2 movie clip loaders - one to load jpg's and one for external swfs.
          > They are both working but.....when i'm on the photo section, and try and load
          > an external swf, the swf loads, but the photo doesn't go away.
          > What code do I use??
          > Thanks!!!

          my_mc._visible = false;

          or you can use swapDepths to put one mc above another.
          tralfaz


          • 2. Re: movie clip loader
            dc12 Level 1
            Thanks!!!
            I have a couple of other questions...
            1. If I want to make 2 separate mc's invisible, do I have to use 2 lines of code?

            2. If I want to make the mc fade out before it becomes invisible, what code do I need to use?
            Thanks again.
            • 3. Re: movie clip loader
              Level 7
              > 1. If I want to make 2 separate mc's invisible, do I have to use 2 lines of
              > code?

              Are you trying to save on pixels or something? hehehe
              my_mc1._visible = false
              my_mc2._visible = false


              > 2. If I want to make the mc fade out before it becomes invisible, what code
              > do I need to use?

              Here is a function that can fade in or out a movieclip.
              If the stepSize is negative, it will fade out the clip.

              //**********************************************
              function fade(mc, stepSize)
              {
              mc._alpha += stepSize;
              updateAfterEvent(); // looks smoother
              if (mc._alpha < 1)
              {
              mc._alpha = 0;
              clearInterval(id); // end the fade out
              }
              else if (mc._alpha >= 100)
              {
              mc._alpha = 100;
              clearInterval(id); // end the fade in
              }
              }

              //**********************************************
              // fade out button
              btn1.onPress = function()
              {
              id = setInterval(fade, 20, mc1, -3); // fade out mc1
              }
              //**********************************************
              // fade in button
              btn2.onPress = function()
              {
              id = setInterval(fade, 20, mc1, 3); // fade in mc1
              }

              //**********************************************

              Those button codes can be on a timeline instead of inside a button.
              The fade in and out is set to alpha steps of 3. Change that number for faster or slower fades.

              luck,
              tralfaz