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

Button issue in animate HTML5 error message

New Here ,
Feb 29, 2024 Feb 29, 2024

Error message 'To add code for this object please select and instance of the object in the main timeline or movieclip timeline'. This message pops up when I click 'Click to go to frame and play'. I am trying to make a replay button.  I am using HTML5.

I don't know if this is related, but when I first click on my animation there is nothing in the timeline; I have to double click on my charecter to make my animation appear.

I am very much a beginner user of animate, but I would be greatful for any help you can provide. 

If you need any additional context I will be happy to provide some.

Thanks,

Liz

1.4K
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

correct answers 1 Correct answer

Community Expert , Mar 01, 2024 Mar 01, 2024

i suspect the problem's caused by trying to add something to a tween layer (or even worse nested tweens).

Translate
Community Expert ,
Feb 29, 2024 Feb 29, 2024

Hi.

 

You need to make sure that you're working on a HTML5 Canvas document, that you are trying to add a HTML Canvas snippet and that you have a Movie Clip or Button instance on stage selected before using the snippet.

Can you show as your complete view and if you have an instance selected?

Regards,

JC

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
New Here ,
Mar 01, 2024 Mar 01, 2024

Here is a full screenshot, I am using HTML 5 canvas and snippetsimage adobe community 2.PNGexpand image

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 ,
Mar 01, 2024 Mar 01, 2024

Thanks.

 

Which code is generated for you?

When I select a Button instance here and double click on Click to Go to Frame and Stop on the Snippets panel it adds the code correcly.

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
New Here ,
Mar 04, 2024 Mar 04, 2024

No code is generated, as far as I can tell.  The error message just pops up and no code is added.

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 ,
Mar 01, 2024 Mar 01, 2024

i suspect the problem's caused by trying to add something to a tween layer (or even worse nested tweens).

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
New Here ,
Mar 04, 2024 Mar 04, 2024

How do I make it not a tween layer? and what is a nested tween? Thank You

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
New Here ,
Mar 04, 2024 Mar 04, 2024

This worked, I pasted the layers from the Tween layer to the scene layer and I can now use the button (yay!). However, I now have a new problem. My animation pasted too far above the stage so it cannot be seen if I save it. I have tried moving the layer using highlighting and also the 'edit multiple frames' function, but my motion tweens no longer work, or objects dissapear. Is there a way for me to move the stage up to fit my animation, or a way for me to move the layers/animation without damaging the tweens?

Thank you 🙂

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 ,
Mar 04, 2024 Mar 04, 2024
LATEST

move all the assets in all the tween keyframes by the same amount.

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 ,
Feb 29, 2024 Feb 29, 2024

yes, what type of object is that replay object?  ie, did you draw somethings > right click > click convert to object???

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
New Here ,
Mar 01, 2024 Mar 01, 2024

I used the shape tool and converted it to an object

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