Skip to main content
Participant
December 13, 2020
Question

Can't find variable: exportRoot error in external Javascript

  • December 13, 2020
  • 1 reply
  • 275 views

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

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    December 13, 2020

    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.

    Juan1587Author
    Participant
    December 13, 2020

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

     

    Thank you for your reply!

    kglad
    Community Expert
    Community Expert
    December 13, 2020

    you're welcome