Skip to main content
Participant
June 2, 2019
Answered

Controll Timeline from website

  • June 2, 2019
  • 1 reply
  • 241 views

Dear forum members,

I'm quite new to Animate CC and didn't work much with flash before. So sorry if the question is stupid.

I would like to control a HTML5 canvas project created with Animate CC via Javascript and control the timeline.

I have done it so far by stopping the animation via exportRoot.gotoAndStop(frame number) and manually selecting the frame. I would like to have more control over the timeline.

I have another graphic in this project that should not be stopped at the same time. it should run animated and repeat itself.

Maybe to explain it a little bit more descriptive using an example:

I have a scene from a room. in this room there is a fan on the wall that rotates. now the timeline controls my camera movement and some other processes. i want to be able to control these via javascript ( set the frame ) but the fan should continue to run and not be stopped at the respective frame.

So here's my first question: is my approach to exportRoot.gotoAndStop() correct or is there a much more sensible approach?

and secondly: is it possible to keep objects like the fan running despite stopping the animation?

I hope you can help me with this and give me a hint in the right direction.

This topic has been closed for replies.
Correct answer ClayUUID

valentinw  wrote

I have a scene from a room. in this room there is a fan on the wall that rotates. now the timeline controls my camera movement and some other processes. i want to be able to control these via javascript ( set the frame ) but the fan should continue to run and not be stopped at the respective frame.

That's what movieclips are for. Movieclip timelines run independently of their parent timeline.

1 reply

ClayUUIDCorrect answer
Legend
June 3, 2019

valentinw  wrote

I have a scene from a room. in this room there is a fan on the wall that rotates. now the timeline controls my camera movement and some other processes. i want to be able to control these via javascript ( set the frame ) but the fan should continue to run and not be stopped at the respective frame.

That's what movieclips are for. Movieclip timelines run independently of their parent timeline.