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

54

Likes

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
Adobe Community Professional ,
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.

Likes

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!

Likes

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

Copy link to clipboard

Copied

LATEST

you're welcome 

Likes

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