Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

on canvas: TypeError undef... ...ject (evaluating 'c.tickEnabled')

New Here ,
Jul 09, 2021 Jul 09, 2021

Hello and thank you all in advance 

 

I'm using Animate 20.0.5.1
Doing a canvas interactive animation, it works well but I get this error: 

 

 

 

TypeError: undefined is not an object (evaluating 'c.tickEnabled')

 

 

 

Which I don't understand given that it is not from a function of mine. Luckily this does not prevent my canvas from running well. I am only concerned with understanding why it happens. 

 

I was able to find what causes it but I could not interpret what it is due to. I will try to explain it in short.

 

I have a MovieClip called to play as a transition between 2 frames, at the middle of the MC animation, it calls for a gotoAndPlay at the main timeline: 

 

Main Timeline / Frame 114 / CODE:

 

 

root.transition = function(aCualVamos)
{
	root.selectedSection = aCualVamos;
	root.transition_mc.gotoAndPlay(2); 
}

root.clk_01.addEventListener("click", root.transition.bind(this, "s1"));

 

 

 

The action in the middle of "transition_mc" animation: 

 

 

this.parent.gotoAndStop(root.selectedSection); 

 

 

The console error appears exactly after running this line

 

Action Frame 126: label: "s1"

 

 

root.back_btn.addEventListener("click", root.transition.bind(this, "map"));

 

 



BUT!
When I click at the back_btn, who calls the same function, same mc, same line of code before has shown the error, this new call does not show any errors!? 

If I call again the first button, the error will appear again. 

 

 

Here is a link where you can see it working DEMO CANVAS

And here is the fla file: ERROR.FLA  

Thank you for taking the time to read my question

TOPICS
Code , Error , Performance
317
Translate
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 Expert ,
Jul 12, 2021 Jul 12, 2021

the first error i see is your "click" listener.  try:

 

root.transition.bind(this)("s1");
Translate
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
LEGEND ,
Jul 13, 2021 Jul 13, 2021
Translate
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 Expert ,
Jul 13, 2021 Jul 13, 2021
LATEST

@ClayUUID, thanks.  i didn't know.

Translate
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