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

Can't find variable: exportRoot error in external Javascript

New Here ,
Dec 12, 2020 Dec 12, 2020

Copy link to clipboard

Copied

I'm trying to get a reference to exportRoot from a js file that I added as an external file within the project. But I'm getting this error:

Can't find variable: exportRoot

 

Doest anyone know how can I get a reference to my objects in the timeline from an external javascript file?

 

Thank you

Views

160

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 ,
Dec 13, 2020 Dec 13, 2020

Copy link to clipboard

Copied

your external js file is probably trying to reference the timeline before it's instantiated.  ie, delay the reference to exportRoot, at least, a few ms.

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 ,
Dec 13, 2020 Dec 13, 2020

Copy link to clipboard

Copied

Yep, it was exactly that. I solved it using createjs.loadQueue() instead.

 

Thank you for your reply!

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 ,
Dec 13, 2020 Dec 13, 2020

Copy link to clipboard

Copied

LATEST

you're welcome 

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