0 Replies Latest reply: Apr 19, 2007 10:18 PM by gold987987987 RSS

    Actionscript Slideshow horror!!!

    gold987987987 Community Member
      Hey everyone,
      I've got a simple random actionscript slideshow that loads external jpgs into a mc. Everything works good but i can't get the darn jpgs to fade in and out. Could someone please help, the deadline approaches.

      Here is the AS for the movieclip, it's in the 1st frame:

      mc = function() {
      num = (Math.round(Math.random()*2));
      // 50 being the number of your jpg, rename them from 0.jpg to 49.jpg
      totalfilename = num + ".jpg";
      picLoader.loadMovie(" http://www.venture-multimedia.com/factory/flash/" + totalfilename);
      // _root.picLoader being an empty movie clip instance name picLoader, just rename it to watever is
      //your movieClip name and rename the address of your site and folder where your images are
      }
      mc();
      // If you want them to come on an interval of 20 seconds
      clearInterval(mc.intID);
      mc.intID = setInterval(mc, 3000);


      An here is the AS for making it fade in and out. This is applied to the mc itself:

      onClipEvent (load)
      {
      this._alpha = 0;
      }

      onClipEvent (enterFrame)
      {
      if (this._alpha < 100)
      {
      this._alpha = this._alpha + 5;
      } // end if
      if (this._alpha >= 100)
      {
      this._alpha = 100;
      } // end if
      }

      Thanks for your help!