Need help understanding an HTML5 error
So I'm putting together a website with Animate CC and I'm using an HTML5 canvas....which I'm reasonably new at. I'm putting together a gallery section with multiple categories, which are all contained inside a master "Gallery" movieclip. The gallery sections each have thumbnail images, which are clicked on to reveal a larger version of the image and then when the large version is clicked on it disappears.
The first section worked perfectly. Here's how I did it. I used this code to make the larger image invisible to start:
this.DinoZombies.visible = false;
Then attached this code to the corresponding thumbnail to reveal it:
this.DinoZombiesBTN.addEventListener("click", fl_MouseClickHandler.bind(this));
function fl_MouseClickHandler()
{
this.DinoZombies.visible = true;
}
Then attached this code to the fullsized image so it could be turned back off:
this.DinoZombies.addEventListener("click", fl_ClickToHide_3.bind(this));
function fl_ClickToHide_3()
{
this.DinoZombies.visible = false;
}
Everything worked fine but when I moved onto the next section of the gallery and used the exact same approach for the new images, it wouldn't export properly and I got these errors:
Failed to load resource: the server responded with a status of 404 (Not Found)
New-Websitev4.js?1498061590809:10881 Uncaught TypeError: Cannot set property 'visible' of undefined
at lib.GallerySection.frame_0 (New-Websitev4.js?1498061590809:10881)
at a.b._runActions (createjs-2015.11.26.min.js:17)
at a.b.setPosition (createjs-2015.11.26.min.js:17)
at a.b.setPosition (createjs-2015.11.26.min.js:17)
at lib.GallerySection.c._updateTimeline (createjs-2015.11.26.min.js:14)
at lib.GallerySection.c.advance (createjs-2015.11.26.min.js:14)
at lib.GallerySection.c._tick (createjs-2015.11.26.min.js:14)
at lib.NewWebsitev7.b._tick (createjs-2015.11.26.min.js:13)
at lib.NewWebsitev7.c._tick (createjs-2015.11.26.min.js:14)
at a.b._tick (createjs-2015.11.26.min.js:13)
New-Websitev4.js?1498061590809:13135 Uncaught TypeError: Cannot read property 'addEventListener' of undefined
at lib.NewWebsitev7.frame_99 (New-Websitev4.js?1498061590809:13135)
at a.b._runActions (createjs-2015.11.26.min.js:17)
at a.b.setPosition (createjs-2015.11.26.min.js:17)
at a.b.setPosition (createjs-2015.11.26.min.js:17)
at lib.NewWebsitev7.c._updateTimeline (createjs-2015.11.26.min.js:14)
at lib.NewWebsitev7.c.advance (createjs-2015.11.26.min.js:14)
at lib.NewWebsitev7.c._tick (createjs-2015.11.26.min.js:14)
at a.b._tick (createjs-2015.11.26.min.js:13)
at a.b.tick (createjs-2015.11.26.min.js:13)
at a.b.update (createjs-2015.11.26.min.js:13)
My primary field is animation so coding and deciphering errors like this isn't really my strong suit anyway but it doesn't make sense to me that it's having issues with this code that I've already succesfully used before. It actually sites "event listeners" and "visible" as being issues but they've been used without issue already in the website.
Please help!
Thanks
