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

Why my variable is not changed

Community Beginner ,
Oct 15, 2024 Oct 15, 2024

Copy link to clipboard

Copied

Hello,

 

I have a variable myQuestion but it doesn't display. What problem can be?

 

 

Views

795

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 16, 2024 Oct 16, 2024

Copy link to clipboard

Copied

Joao asked and I showed the error

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 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

Thanks for the file.

 

Even though there are a couple of issues, it worked for me.

 

But, anyway, you can fix at least the issues below.

It should be this.gotoAndStop(1);. In the HTML5 Canvas document, the first frame is 0, then 1, 2, and so on.
image.png

There's no myQuestion text field in the second frame of the main timeline. This text field is inside of another symbol. So you should either remove line 4 - as you also have the same instruction inside of the forementioned symbol - or give a name to this symbol in which you have the text field and change the reference. For example: this.sealAnim.myQuestion.text = "Hello";. // sealAnim would be the name of the Movie Clip that contains the seal animation.
image.png

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 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

I removed it from the Frame 2 because it didn't work, so that's why I created it in seal layer. There it works. I want it on the main scene as i feel that in future I will have a problem with the button to go to the main scene from seal layer. I allow you to add text to the main scene to test.

Also I have a problem with animation in html - https://community.adobe.com/t5/animate-discussions/why-i-don-t-see-my-hero/m-p/14913266#M378615 . Could you test it?

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 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

LATEST

Should I put this.gotoAndPlay(1) as animation on Frame2?

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