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

Uncaught TypeError: cjs.MovieClip is not a constructor

New Here ,
Oct 01, 2024 Oct 01, 2024

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

 

TOPICS
ActionScript , Code , Error
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
Community Expert ,
Oct 01, 2024 Oct 01, 2024

where do you see that error?

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

@kglad thanks for replying. I inpect the page and I see this in the console tab:

 

Screenshot 2024-10-01 at 18.37.11.png

 

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

click the right-side link and copy and paste a few lines around 1350

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

I can't see the code when i click the right-side link, but this is the code around line 1350:

 

Screenshot 2024-10-01 at 20.40.09.png

 There is no code at 3153 as the last line of code is 1826

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

at the top of that on method add 

 

console.log(_this.Mouth_info)

 

and retest.

 

what's the console output?

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

Sorry not sure where you mean i should add the additional code! I added it here in Squarespaces code editor:

 

Screenshot 2024-10-01 at 21.06.32.png

The console output is this:

 

Screenshot 2024-10-01 at 21.10.48.png

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

add the code on animate

then test

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

I've added the code in Animate and it's the same. Console output at 1351 is:

 

Screenshot 2024-10-01 at 21.54.12.png

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?

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

what do you see when you click the right-side link?

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 ,
Oct 02, 2024 Oct 02, 2024

I don't think it's changed:

 

Screenshot 2024-10-02 at 09.41.53.png

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 ,
Oct 02, 2024 Oct 02, 2024

what's the relevent code in animate?

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 ,
Oct 02, 2024 Oct 02, 2024

@kglad I wish i knew! How do i find this out?

Thanks for your help so far!

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 ,
Oct 02, 2024 Oct 02, 2024

where is your code?

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 ,
Oct 07, 2024 Oct 07, 2024

@kglad My code is in the actions panel and I added it using wizard

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 ,
Oct 07, 2024 Oct 07, 2024

upload your fla to a file server and post a link.

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 ,
Oct 07, 2024 Oct 07, 2024
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 ,
Oct 08, 2024 Oct 08, 2024

remove your global code.

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 ,
Oct 08, 2024 Oct 08, 2024

@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. 

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 ,
Oct 08, 2024 Oct 08, 2024

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?

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 ,
Oct 08, 2024 Oct 08, 2024

@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: 

 

Screenshot 2024-10-08 at 10.56.25.png

 

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 ,
Oct 08, 2024 Oct 08, 2024

what doesn't work? your mouse overs?

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 ,
Oct 08, 2024 Oct 08, 2024

Nothing appears after adding the code, the web page is blank. I've tested this on the live website in safe mode and incognito

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 ,
Oct 08, 2024 Oct 08, 2024

test using animate

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 ,
Oct 08, 2024 Oct 08, 2024

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.

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