Highlighted

Canvas HTML DOM getElementById() of specific movieclip

New Here ,
Jun 05, 2020

Copy link to clipboard

Copied

Hey guys, I'm using Animate 2020 publishing export into HTML5 canvas for Google banners. One of the requirements of the platform is to stop all animation after clickthrough. In order to do so, I would like to do the following. 

 

After publishing *.fla file, inside resulting HTML document I would like to use getElementById() function to access certain movie clip called "mcHolder" at making it gotoAndStop() to a specific frame called "last_frame". So I'm trying to access it this way. This is how exportroot is defined by the publishing process

 

 

exportRoot = new lib._20Q2_BANNER_300x250_NL();

 

 

Any suggestions on how to make it work? This one below can not do the job.

 

 

exportRoot.mcHolder.children[0].gotoAndStop('last_frame');

 

I understand that this question is more coding related than animation. But maybe someone already figured it out.

 

kind regards, Tania

TOPICS
Code

Views

78

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

Canvas HTML DOM getElementById() of specific movieclip

New Here ,
Jun 05, 2020

Copy link to clipboard

Copied

Hey guys, I'm using Animate 2020 publishing export into HTML5 canvas for Google banners. One of the requirements of the platform is to stop all animation after clickthrough. In order to do so, I would like to do the following. 

 

After publishing *.fla file, inside resulting HTML document I would like to use getElementById() function to access certain movie clip called "mcHolder" at making it gotoAndStop() to a specific frame called "last_frame". So I'm trying to access it this way. This is how exportroot is defined by the publishing process

 

 

exportRoot = new lib._20Q2_BANNER_300x250_NL();

 

 

Any suggestions on how to make it work? This one below can not do the job.

 

 

exportRoot.mcHolder.children[0].gotoAndStop('last_frame');

 

I understand that this question is more coding related than animation. But maybe someone already figured it out.

 

kind regards, Tania

TOPICS
Code

Views

79

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
Jun 05, 2020 0

Have something to add?

Join the conversation