Skip to main content
Race Bannon
Participant
February 18, 2019
Question

Is there a component that i can add to my HTM5 file to contol the animation

  • February 18, 2019
  • 1 reply
  • 187 views

Hello

I'm new to animate and I'm converting existing .fla animation to html5 and I wanted to include a player so the person viewing the animation can stop/pause/play and see a progression bar. Is there an (already built) component that I can drop in that will do this?

thank you in advance for your help

    This topic has been closed for replies.

    1 reply

    kdmemory
    Inspiring
    February 18, 2019

    Hi race bannon

    A ready build component - not that I know of. Unless you are talking about a video which you want to add to the stage with the Video component. This has all the features like stop/pause/play and a progression bar.

    What are you talking about anyway? Converting existing Fla animation to HTML5? Do you mean from Actionscript to CreateJS/Javascript?

    Of course if you are making/converting/fiddling a normal animation by working with drawings or graphics on the Timeline, either Motion or Classic Tween, Frame-by-Frame Animation or Shape Tweening, you could wrap this animation into a movieclip (let's call it my_anim) and then add buttons and a bar-graphic-mc on the main timeline and use Javascript like

    this.my_anim.stop();

    // or

    this.my_anim.play();

    // or

    this.my_anim.gotoAndStop(0);

    to program something like you stop/pause/play idea. Or with the bar-graphic you could create a progression bar by utilizing methods like

    this.my_anim.currentFrame;

    // or

    this.my_anim.totalFrames;

    // and

    this.my_bar_graphic. width = // proportion of currentFrame to totalFrames

    You get it? For a normal animation there's nothing to drop in. You have to develop it yourself or find templates on the web and adapt to what suits you. You could of course build the animation first and export it as a video (File -> Export -> Export Video ...) and import that again into another Animate HTML5 file and use the Video Component, which is the standard HTML5 Video element with the usual video controls including stop/pause/play and progress bar like Big Buck Bunny.

    Klaus

    Race Bannon
    Participant
    February 18, 2019

    Hello Klaus

    Thank you for the response

         The reason: I'm converting existing animated.swf files (with audio) to html5 files. in most cases I have found the .fla and converted to html5. But the viewer only has one shot to see and hear the animation, so I was hoping for a component (or something like that) that can be added to the timeline. to control the animation. similar to what I have seen in storyline.

    Maybe I should look at exporting the storyline element and see if I can import it into my fla?

    I will look for a template on the web, i need to stay away from video for this project. and idea where to look for a template?

    thank you again for your help.