Copy link to clipboard
Copied
Hello,
Forgive me if this is a dumb question. So I just started to use Animate, and followed a turorial right here.
https://www.youtube.com/watch?v=Y9lxYi-EU0g
I was trying to make a carousel with next and previous buttons. And I created from code snippet an action script like this.
this.prevBtn.addEventListener("click", fl_ClickToGoToAndStopAtFrame.bind(this));
function fl_ClickToGoToAndStopAtFrame()
{
this.gotoAndStop(1);
}This is almost the default code snippet, except for that I changed the frame number to fit in my number of frames.
However, I keep getting this error: 1061: "Call to a possibly undefined method bind." and I don't know where to start debugging.
I would appreciate any suggestions. Please help.
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.
But if what you want is really AS3, then make sure you're using AS3 snippets.
Please let us know if fixes the problem.
Regards,
JC
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.
But if what you want is really AS3, then make sure you're using AS3 snippets.
Please let us know if fixes the problem.
Regards,
JC
Copy link to clipboard
Copied
Hello,
Thanks for the very quick reply. It was correct! I changed it to html canvas and rewrote the code and my project works fine now.
When I Ctrl + Enter now it plays on my browser instead of the window like in the tutorial, but I guess it's some minor difference.
Anyway thank you.
Best regards,
Thang
Copy link to clipboard
Copied
That's great! You're welcome.
Yeah, the test feature in HTML5 Canvas documents always open a browser.
Regards,
JC
Copy link to clipboard
Copied
Are you working in an HTML5 Canvas FLA? If you're using an ActionScript 3.0 FLA you would see that error.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more