3 Replies Latest reply on Apr 19, 2007 5:15 PM by Optikalefx

    Need some help running simultanious scripts

    shieldwolf342
      Hi,
      I am currently running in an animation a live refresh clock and a motion path.
      This is the clock script i am using in frame 1.
      time=new Date(); // time object
      var seconds = time.getSeconds()
      var minutes = time.getMinutes()
      var hours = time.getHours()
      if (hours<12) {
      ampm = "AM";
      }
      else{
      ampm = "PM";
      }
      while(hours >12){
      hours = hours - 12;
      }
      if(hours<10)
      {
      hours = "0" + hours;
      }
      if(minutes<10)
      {
      minutes = "0" + minutes;
      }
      if(seconds<10)
      {
      seconds = "0" + seconds;
      }
      clock_txt.text = hours + ":" + minutes + ":" + seconds +" "+ ampm;


      My issue is that after i added the motion path for an object the clock only updates at the end of the animation and not during the entire sequence unless the script to start the clock is in the second frame and then nothing else runs. i am currently using gotoAndPlay(1); to get the clock to run.

      My question is: Is there a way to get all of my motion paths and motion tweens to run at the same time as the clock?[