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

Getting Loopy

Engaged ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

Seems almost silly to ask but I have a simple animation with a loop. 

  1. Frame 1  (0) code:
  2. var _this = this;
  3. _this.stop();
  4. var _this = this;
  5. _this.IndexNext1.on('click', function(){
  6. _this.gotoAndPlay('Indx1');
  7. });

This works. 

On frame 100, if I use this code, it doesn't work:

  1. var _this = this;
  2. _this.gotoAndPlay('indx1');

However, if I send it to a different frame with this code, it works:

  1. var _this = this;
  2. _this.gotoAndPlay('repeat1');

 

I figure I'm missing a basic concept here, but I don't know what it is.  Is there a better way to move the playhead to a labeled frame?

 

Thanks!

 

TOPICS
Code , How to , Timeline

Views

278

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 , Jun 26, 2021 Jun 26, 2021

Hi.

 

One thing I noticed is that in your example you started the label name with a capital I ("Indx1") and in a line below you started the label name with a lowercase i ("indx1").

 

Could this be the issue?

 

Please let us know.

 

Regards,

JC

Votes

Translate

Translate
Community Expert ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

Hi.

 

One thing I noticed is that in your example you started the label name with a capital I ("Indx1") and in a line below you started the label name with a lowercase i ("indx1").

 

Could this be the issue?

 

Please let us know.

 

Regards,

JC

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
Engaged ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

Thanks JC!  LOL, can you tell that I haven't done this in a while?  I haven't coded much since Flash died.  I was pretty good at AS3.  Back to making all my rookie mistakes again I guess.

Have a great weekend!

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 ,
Jun 26, 2021 Jun 26, 2021

Copy link to clipboard

Copied

LATEST

You're welcome!

 

And I do believe in you! I make mistakes like that too. 😄

 

Welcome back and have a great weekend you too!

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