• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adobe Animate looping issue

Community Beginner ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

Hi,

I am fairly in-experienced when it comes to Animate, so I am wondering if someone can please help me with an issue I am having.

I have setup a sequence of images and created a movie clip for them. I have then created a button that will play the movie clip symbol. All of this is working but when the clip is played it just loop and starts again. What I am trying to acheive is that once the clip is finished it will go to the next frame.

Is this possible and if so how can it be done?

 

Hopefully this all make sense, If not I have I have attached some images that will hopefully clarify this.

Thanks.

Frame 1Frame 1Frame 2Frame 2Frame 3Frame 3

TOPICS
ActionScript , Code , How to , Timeline

Views

5.5K

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
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 01, 2019 Nov 01, 2019

without downloading the file I can see the problem. Above I wrote " (frame numbers start at 0,1, 2,3)"

 

so gotoAndStop(2) will be going to frame 3 (since the first frame is 0, second frame is 1, and third frame is 2... can be confusing. This is why its sometimes best to use labels. Create a new layer and call it "Labels" or "L" and add a keyframe on the frame where you want the playhead to go, click the empty keyframe and in the Properties panel on the left under "Label" you can enter a name fo

...

Votes

Translate

Translate
Community Expert ,
Oct 31, 2019 Oct 31, 2019

Copy link to clipboard

Copied

hi,

 

movieclips loop independently over and over. There are two ways to fix this.

 

One, is add a stop(); action at the last frame of the MovieClip, and then add a gotoAndPlay(); script under the stop action. But you might have to target the moveiclip or timeline that you are looking to play.

 

and easier way is to just the behavior type of the MovieClip to "Graphic" then change the looping mode to "play once" then your movieclip will only play once (make sure it is on the timeline for as many frames as in the movieclip, so if movieclip is 30 frames, that MovieClip will need to be displayed for 30 frames on the main timeline so it plays in its entirety), and then move on to play the next frame.

 

Hope this helps!

cheers,
mark

Consulting | Design | Motion | Training>headTrix, Inc. | Adobe Certified Training & Consulting<br />Consulting | Design | Development | Training

Votes

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
community guidelines
Community Beginner ,
Oct 31, 2019 Oct 31, 2019

Copy link to clipboard

Copied

Hi Mark,

 

Thanks for that. I think I would prefer t ouse the first option as I think it would be more useful in the long term, however I am not sure how I go about targeting the movie clip. At this stage the movie clip symbol called bathroom_1, if I am on the last frame for the clip, what action would I use to then see the scene or frame (timeline)?

 

Votes

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
community guidelines
Community Expert ,
Oct 31, 2019 Oct 31, 2019

Copy link to clipboard

Copied

HI Ben,

 

You are welcome, glad I was able to help. Both options are good to know. Getting something done quickly is surely important.

 

You can place a stop action on the last frame of the movieclip, extend it on the main timeline so it is equivalent to the frames within the MC, and then place your new movieclip or whatever in the next frame.

 

Or via coding (assuming HTML 5 Canvas)
Its a good idea to use a NEW layer and name it "A" or "ACTIONS" - create a new layer on the main timeline and place a stop action on frame 1 "this.stop();" The movieclip will ONLY be on frame 1, the main timeline will stop at Frame 1 and play thru the movieClip. In the movieclip timeline again add a new layer for Actions, and add a keyframe on the last frame of the animation and place this code:

 

this.stop();

this.parent.gotoAndStop(2);

 

this will stop the MovieClip, and then send the playhead to the Main Timeline(the root timeline) and then go to and Stop on the 3rd frame (frame numbers start at 0,1, 2,3). You can also use "gotoAndPlay(2);"  so it plays the timeline, or it can just stop and in frame 3 you can have another animated Movieclip.

 

I created a small file for you to download and check out MY_EXAMPLE_HERE


Hope this helps!

 

cheers,
mark

 

 

Consulting | Design | Motion | Training>headTrix, Inc. | Adobe Certified Training & Consulting<br />Consulting | Design | Development | Training

Votes

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
community guidelines
Community Beginner ,
Oct 31, 2019 Oct 31, 2019

Copy link to clipboard

Copied

Thanks again, I feel like I am so close, but missing something

I have attached a link of my file, would you mind having a look?

 

Basically when I click the button it skips the clip and goes to the 3rd frame.

 

https://www.dropbox.com/sh/3bi9vabztq2o6ia/AAAEhT6g-e5wc10D1JwtlOEBa?dl=0

Votes

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
community guidelines
LEGEND ,
Nov 01, 2019 Nov 01, 2019

Copy link to clipboard

Copied

Your first frame script is this: this.gotoAndStop(2);

 

it should be: this.gotoAndStop(1);

 

Something that will speed up testing is to turn off the Export document as texture option in publish settings. You can turn that on again for the final publish, or before uploading a version to your server, but for testing it just adds a lot of time.

Votes

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
community guidelines
Community Expert ,
Nov 01, 2019 Nov 01, 2019

Copy link to clipboard

Copied

without downloading the file I can see the problem. Above I wrote " (frame numbers start at 0,1, 2,3)"

 

so gotoAndStop(2) will be going to frame 3 (since the first frame is 0, second frame is 1, and third frame is 2... can be confusing. This is why its sometimes best to use labels. Create a new layer and call it "Labels" or "L" and add a keyframe on the frame where you want the playhead to go, click the empty keyframe and in the Properties panel on the left under "Label" you can enter a name for that keyframe.

 

then your script can be 
this.gotoAndStop("myLabel");

 

Hope that helps!
mark

Consulting | Design | Motion | Training>headTrix, Inc. | Adobe Certified Training & Consulting<br />Consulting | Design | Development | Training

Votes

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
community guidelines
Community Beginner ,
Nov 03, 2019 Nov 03, 2019

Copy link to clipboard

Copied

Yusss!!!  that worked. thanks so much Mark, those label are going to be handy.

Now I just have to getting it working on the actual final product 🙂

Votes

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
community guidelines
Community Expert ,
Nov 05, 2019 Nov 05, 2019

Copy link to clipboard

Copied

LATEST

Woo Hoo! Happy to hear that it worked.... can be frustrating trying to work it out, but that's pretty normal for programming. And always feels great when its solved! You are so welcome... and Good work!

 

Cheers,
mark

Consulting | Design | Motion | Training>headTrix, Inc. | Adobe Certified Training & Consulting<br />Consulting | Design | Development | Training

Votes

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
community guidelines