Skip to main content
Aldrin Oneal
Participating Frequently
April 6, 2018
Answered

Animated button html5 canvas

  • April 6, 2018
  • 1 reply
  • 412 views
    This topic has been closed for replies.
    Correct answer JoãoCésar17023019

    Hi.

    Here is a small sample using the default Button symbol.

    Notice that I only put a small script in the up/out state so the user won't see the animation when the button is loaded. If you change the total frames of the bar animation, don't forget to update the 14 number in line 3.

    Also notice it that I didn't use color effect for the text color animation because of browser compatibility.

    Please fell free to tweak the animations or whatever other change needed.

    Preview:

    Up/Out state script:

    if (!this.parent.firstTime)

    {

         this.gotoAndStop(14);

         this.parent.firstTime = true;

    }

    FLA download:

    animate_cc_htm5_animated_button.zip - Google Drive https://bit.ly/2HhZkS0

    I hope it helps.

    Regards,

    JC

    1 reply

    JoãoCésar17023019
    Community Expert
    JoãoCésar17023019Community ExpertCorrect answer
    Community Expert
    April 6, 2018

    Hi.

    Here is a small sample using the default Button symbol.

    Notice that I only put a small script in the up/out state so the user won't see the animation when the button is loaded. If you change the total frames of the bar animation, don't forget to update the 14 number in line 3.

    Also notice it that I didn't use color effect for the text color animation because of browser compatibility.

    Please fell free to tweak the animations or whatever other change needed.

    Preview:

    Up/Out state script:

    if (!this.parent.firstTime)

    {

         this.gotoAndStop(14);

         this.parent.firstTime = true;

    }

    FLA download:

    animate_cc_htm5_animated_button.zip - Google Drive https://bit.ly/2HhZkS0

    I hope it helps.

    Regards,

    JC

    Aldrin Oneal
    Participating Frequently
    April 6, 2018

    wow! thank you very much