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
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.
Copy link to clipboard
Copied
Yep, it was exactly that. I solved it using createjs.loadQueue() instead.
Thank you for your reply!
Copy link to clipboard
Copied
you're welcome