6 Replies Latest reply on Nov 10, 2006 8:36 AM by kglad

    Simple ActionScript question

    Rupda
      .

      I'm not a coder and I haven't had much luck finding the answer to this...

      I'm using this code below to run a flash movie -- which I didn't do as I can't code -- and want to know how to make the movie simulate that constant looping effect (using the current code below) even when the mouse is not over it? Also, how would I slow the overall speed down by altering the code below?

      MY flash sample:* http://www.rupda.com/flash/


      Sample of what I'm trying to acheive: http://www.cbsparamount.com/television/


      Is it even possible?? Help!!


      onClipEvent (load){
      center = 522/2;
      //length of entire row of pics - movie width
      lengthy = -2155.3 + 522;
      }
      onClipEvent (enterFrame) {
      /*
      //original code
      if (_root.mainVar == 0)
      {
      homeX = (-_root._xmouse)+1000;
      } else
      {
      homeX = (-_root.mainVar)+1000;
      }
      thisX = _x;
      diffX = homeX-thisX;
      if (_root.mainVar == 0)
      {
      moveX = diffX/30;
      } else
      {
      moveX = diffX/5;
      }
      _x = thisX+moveX;
      */

      diffX = _root._xmouse - center;
      _x -= diffX/20;

      if(_x >=0){ //making sure it doesn't overscroll
      _x = 0;
      }else if(_x <= lengthy){
      _x = lengthy;
      }
      }




      THANKS IN ADVANCE!