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

same code, buttons failed to work after a few successes

New Here ,
Sep 11, 2022 Sep 11, 2022

Copy link to clipboard

Copied

Hello everyone, im new to animate and i am trying to make a simple html5 canveas-based interactive animation with mainly navigation buttons. 

 

I use the gotoandplay/stop code from the code snippets a lot to build the buttons, they worked pretty well for the first few buttons, but i just couldn't make them work when i try to build more of them. Considering the numbers of the repeating codes I use, and the simple change I made (just changed the frame number as the instruction says), I think it would not make many sense to the post the whole codes here. 

 

Google console gives me error report when i publish the animation, of which i think might be helpful to post them below:

Uncaught TypeError: Cannot read properties of undefined (reading 'addEventListener')
at lib.weneedtotalkaboutlynchsyndrome.frame_53 (index.js?1662924142788:3129:17)
at d._runActionsRange (createjs.min.js:19:7215)
at b._runActions (createjs.min.js:19:3229)
at b._runActionsRange (createjs.min.js:19:10055)
at b._runActions (createjs.min.js:19:3229)
at b.setPosition (createjs.min.js:19:1519)
at c._updateTimeline (createjs.min.js:14:29260)
at c.advance (createjs.min.js:14:28504)
at c._tick (createjs.min.js:14:28796)
at b._tick (createjs.min.js:13:11081)

 

I have taken advice from the other answers from the community to make a few changes to the settings (for example disable the advance layer), but it sadly didn't fix the problem. 

 

I feel like it wouldn't be a really complicated problem as i only use the basic code from code snippets, but i just couldn't figure it out for days. could anyone help me with this... 😭 (i hope my description makes sense, but please let me know if there are details that i didn't make clear). Thank you in advance!

TOPICS
Code , Error , How to , Timeline

Views

342

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 ,
Sep 12, 2022 Sep 12, 2022

Copy link to clipboard

Copied

line 17 of index.js has an undefined object.  fix that.

 

if you don't understand that, copy and paste line 17 here.

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
New Here ,
Sep 12, 2022 Sep 12, 2022

Copy link to clipboard

Copied

Hello Kglad, thank you very much for your reply! I really don't understand it... , here's line 17 of index.js:
{name:"index_atlas_7", frames: [[0,0,1026,1090]]},

 

My laptop automatically opened the index.js file in R, R gives blue round "i" icon for the lines afterwards saying "['index_atlas_7'] is better written in dot notation." I don't what does it mean either, but thought that might help?

 

R also gives many error reports in yellow rectangle, I've attached the screenshot below. I don't understand why it could go wrong... since I didn't write single line of codes but just add code snippets and wizard from the software.......

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 ,
Sep 15, 2022 Sep 15, 2022

Copy link to clipboard

Copied

oops, my error.  

 

that's line 3129 (17th space). paste line 3129.

 

and there are no errors in the screenshot you showed (though i have no idea what "R" means).

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 ,
Sep 15, 2022 Sep 15, 2022

Copy link to clipboard

Copied

Same problem here. I think it's an update bug, because my file worked perfectly last week and today it gives me errors without having made any changes! a real headache...

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
New Here ,
Oct 26, 2022 Oct 26, 2022

Copy link to clipboard

Copied

i rebuilt the whole thing with easier structure, now its working. god i hate 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 Expert ,
Oct 26, 2022 Oct 26, 2022

Copy link to clipboard

Copied

learn how to debug.

 

lesson 1 - https://youtu.be/PBDQN9CQSeI

 

lesson 2 - https://youtu.be/KJEl0OenGUY

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
New Here ,
Oct 26, 2022 Oct 26, 2022

Copy link to clipboard

Copied

Thank you very much kglad for the tutorial, have added them to my library. Actually now my project runs well on my local computer, and I have been struggling to put it on the internet where people could attend to my project via url. Could you maybe help me with this?

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 26, 2022 Oct 26, 2022

Copy link to clipboard

Copied

yes, just save your fla to a new directory.  publish to that directory.

 

everything in that directory (except the fla) needs to be uploaded.

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
New Here ,
Oct 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

Any server/domain (not really sure about this) you would recommend? I've been trying GitHub but haven't succeeded. 

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 27, 2022 Oct 27, 2022

Copy link to clipboard

Copied

LATEST

i like inmotionhosting for domain hosting and dotearth for registrar.

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