Copy link to clipboard
Copied
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 Correct answer
i suspect the problem's caused by trying to add something to a tween layer (or even worse nested tweens).
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Here is a full screenshot, I am using HTML 5 canvas and snippets
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
No code is generated, as far as I can tell. The error message just pops up and no code is added.
Copy link to clipboard
Copied
i suspect the problem's caused by trying to add something to a tween layer (or even worse nested tweens).
Copy link to clipboard
Copied
How do I make it not a tween layer? and what is a nested tween? Thank You
Copy link to clipboard
Copied
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 🙂
Copy link to clipboard
Copied
move all the assets in all the tween keyframes by the same amount.
Copy link to clipboard
Copied
yes, what type of object is that replay object? ie, did you draw somethings > right click > click convert to object???
Copy link to clipboard
Copied
I used the shape tool and converted it to an object

