Skip to main content
Inspiring
November 30, 2016
Answered

Animate 2017 Rotate Continously Snippet

  • November 30, 2016
  • 1 reply
  • 434 views

I have created a clock and used the Rotate Continuously snippet in HTML Canvas to rotate the hands of the clock.  The problem I am having is that the hands are increasing in speed and I need them a constant speed. Is there a way to use the snippet without having the speed increase?

Here is the snippet code:

this.addEventListener("tick",fl_RotateContinuously_2.bind(this));

     function fl_RotateContinuously_2(){

            this.hour.rotation+=1;

}

    This topic has been closed for replies.
    Correct answer sctp

    Can you upload your FLA somewhere that I can take a look at it?


    I am an idiot.

    I had Loop Timeline on in the Publish Settings.  Took someone else to come over and tell me. I always tell the people I work with start with the very basic solutions first. Maybe I should listen to my own advice. 

    Thanks for your help

    1 reply

    Colin Holgate
    Inspiring
    November 30, 2016

    It sounds like you have the timeline looping, and so the listener is being added over and over again. Try putting this.stop(); to see if that solves it.

    sctpAuthor
    Inspiring
    December 1, 2016

    Unfortunately, it didn't work.  I tried to place the stop on the same frame, below the snippet as well as the next frame. It still keeps increasing.

    Colin Holgate
    Inspiring
    December 1, 2016

    Can you upload your FLA somewhere that I can take a look at it?