3 Replies Latest reply on May 18, 2016 10:17 AM by ClayUUID

    Timeline duration

    alessiop62030307 Level 1



      I'm working with canvas/Js in Animate CC


      Is it possible to get the duration of timeline (second or frames)? I have to make a progress bar, but i haven't any idea about this. Someone can help me?




        • 1. Re: Timeline duration
          kglad Adobe Community Professional & MVP

          you can use the currentFrame and totalFrames properties of movieclips to do that.


          for example, for a horizontal progress display (progress_bar with fill_mc where fill_mc has left side reg point);


          var tl=this;

          var mc = this movieclip whose timeline play-progress you wish to display



          function f(e){



          1 person found this helpful
          • 2. Re: Timeline duration
            nezarov Level 4




            • 3. Re: Timeline duration
              ClayUUID Adobe Community Professional

              Maybe it's been fixed by now, but when I first tried doing this sort of thing, I found the "official" properties to not be reliable. That's why I use these instead:


              this.timeline.position (instead of this.currentFrame)

              this.timeline.duration (instead of this.totalFrames)

              1 person found this helpful