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

Why my variable is not changed

Community Beginner ,
Oct 15, 2024 Oct 15, 2024

Hello,

 

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

 

 

2.7K
Translate
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

Joao asked and I showed the error

Translate
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

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

Translate
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

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?

Translate
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
LATEST

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

Translate
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