Highlighted

Controll Timeline from website

New Here ,
Jun 02, 2019

Copy link to clipboard

Copied

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.

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

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.

TOPICS
Discussions

Views

80

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Controll Timeline from website

New Here ,
Jun 02, 2019

Copy link to clipboard

Copied

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.

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

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.

TOPICS
Discussions

Views

81

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 02, 2019 0
Adobe Community Professional ,
Jun 03, 2019

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 03, 2019 0