Skip to main content
chess 3,1416
Participant
July 9, 2021
Question

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

  • July 9, 2021
  • 1 reply
  • 364 views

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

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
July 13, 2021

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

 

root.transition.bind(this)("s1");
Legend
July 13, 2021
kglad
Community Expert
Community Expert
July 13, 2021

@ClayUUID, thanks.  i didn't know.