Compiler Error 1061

Community Beginner ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

Hello Everyone, 

 

I am struggling with what I thought was a very easy bit of coding, especially since I am using the code snippets available in Animate. Basically, all I want is for the project to stop at frame 78 then for the user to have to click a "Continue" button for it to then go to fram 82 and play. 

 

I first entered the code for it to stop: 

this.stop();

 

Easy, done, it works. 

 

Then I tried adding the code for a user to click on the instance of Continue_Btn1 for it to then go to frame 82 and play. I even used THEIR code snippet.

 

this.Continue_Btn1.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_9.bind(this));

function fl_ClickToGoToAndPlayFromFrame_9()
{
this.gotoAndPlay(81);
}

 

Now the project just plays right through and does not stop. The button works if I click on it in the brief second it appears, but the project no longer stops. What am I doing wrong? Please help!

 

Thank you!

 

Views

144

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

correct answers 1 Correct answer

Adobe Community Professional , May 27, 2021 May 27, 2021
Hi. It's probably because you're using JavaScript in an AS3 document. Go to File > Convert To > HTML5 Canvas so that Animate will convert all visuals to HTML5, but all coding will be commented out. You're gonna have to uncomment your code or rewrite it. Please let us know if fixes the problem. Regards, JC

Likes

Translate

Translate
Community Beginner ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

I forgot to say that it is saying there is a Compiler Error which says, "Scene1, Layer 'Actions',Frame 78, Line 21, Column 79  1061"Call to a possibly undefined method bind through a reference with static type Function

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 ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

Hi.

 

It's probably because you're using JavaScript in an AS3 document.

 

Go to File > Convert To > HTML5 Canvas so that Animate will convert all visuals to HTML5, but all coding will be commented out. You're gonna have to uncomment your code or rewrite it.

 

Please let us know if fixes the problem.

 

Regards,

JC

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
Community Beginner ,
Jun 02, 2021 Jun 02, 2021

Copy link to clipboard

Copied

LATEST

This fixed it, thanks!

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