1 Reply Latest reply on May 3, 2007 7:29 PM by sly one

    Random movie clips

    vpolite
      Thanks for reading my post. I have a script that randomly displays a movie clip of a logo. As shown below:
      function showLogo(){
      var rndNum:Number = Math.round(Math.random()*11);
      this.attachMovie("logo" + rndNum, "logo1_mc", this.getNextHighestDepth(), {_x:0, _y:0});
      }
      setInterval(showLogo(),1000);

      It seems to be working. But, I still have two problems.
      1. The moviclips stay on the stage after a new clip called.
      2. I'd like to have the movieclips fade in then out.

      My questions:
      1. setInterval() doesn't seem to be called. The online change in the interval between logos comes from the length of the main timeline. How do I get it to work?
      2. How do I remove a movieclip from the stage? Do I apply it to the moveclp being shown? Or the moviclip calling the function?
      3.How does the _alpha function work?

      I'm new to doing this. So, I thank you for your patience in advance.