Copy link to clipboard
Copied
Hi
I've created an interactive infographic in Animate which works fine when I test the movie in a web browser and when ipublish the OAM file in Indesign. However I can't get it to work on my website.
I've copied the js code into my website the infographic doesn't render (no images appear) and I get the following error: Uncaught TypeError: cjs.MovieClip is not a constructor.
Uncaught TypeError: cjs.MovieClip is not a constructor at digestivesystem:1350:20 at digestivesystem:3153:3
Would anyone have any advice as to how to fix this?
Thanks in advcance
Ellen
Copy link to clipboard
Copied
where do you see that error?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
click the right-side link and copy and paste a few lines around 1350
Copy link to clipboard
Copied
I can't see the code when i click the right-side link, but this is the code around line 1350:
There is no code at 3153 as the last line of code is 1826
Copy link to clipboard
Copied
at the top of that on method add
console.log(_this.Mouth_info)
and retest.
what's the console output?
Copy link to clipboard
Copied
Sorry not sure where you mean i should add the additional code! I added it here in Squarespaces code editor:
The console output is this:
Copy link to clipboard
Copied
add the code on animate
then test
Copy link to clipboard
Copied
I've added the code in Animate and it's the same. Console output at 1351 is:
The code at line 1351 which relates to the Mouth info movie clip was from the code editor in Squarespace, not the Console output. So i'm now wondering if the Mouth info movie clip has nothing to do with this error?
Copy link to clipboard
Copied
what do you see when you click the right-side link?
Copy link to clipboard
Copied
I don't think it's changed:
Copy link to clipboard
Copied
what's the relevent code in animate?
Copy link to clipboard
Copied
@kglad I wish i knew! How do i find this out?
Thanks for your help so far!
Copy link to clipboard
Copied
where is your code?
Copy link to clipboard
Copied
@kglad My code is in the actions panel and I added it using wizard
Copy link to clipboard
Copied
upload your fla to a file server and post a link.
Copy link to clipboard
Copied
@kglad thanks! Here is my file: https://www.dropbox.com/t/PuWX1WQnsXkp8a1j
Copy link to clipboard
Copied
remove your global code.
Copy link to clipboard
Copied
@kglad thanks for checking the file! Do i need to remove it from Animate, or in the JS code? How do i identify it?
Unless you are referring to this global script: console.log(_this.Mouth_info)? I added that recently on your advice and it dosent affect the error i'm getting.
Copy link to clipboard
Copied
that's the only error i see (though you have lots of duplicate/superfluous code). ie, i see no error messag after removing that console.log message. do you see any problem in your app?
Copy link to clipboard
Copied
@kglad I've removed that console.log and the problem is the same. The js code doesn't work on my website, I get the Uncaught TypeError: cjs.MovieClip is not a constructor error and then when I click on that error in console this is displayed:
Copy link to clipboard
Copied
what doesn't work? your mouse overs?
Copy link to clipboard
Copied
Nothing appears after adding the code, the web page is blank. I've tested this on the live website in safe mode and incognito
Copy link to clipboard
Copied
test using animate
Copy link to clipboard
Copied
Like i said in my first post, it works fine when I test the movie in a web browser and when ipublish the OAM file in Indesign but I can't get it to work on my website. I'm going to look into a different solution to display it i'm not getting anywhere with the js code. Thanks for your help anyway.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now