Skip to main content
Participant
June 11, 2024
Answered

Error 1120 Access of undefined property for Restart button

  • June 11, 2024
  • 1 reply
  • 734 views

Hi everyone,

I'm new to Adobe Animate and I'm making a stickman movie project, and I have gotten this error with a button.

I've checked the script and the button's instance names all match up but the error keeps showing up.

I tried turning off advanced layers and it works but I need the advanced layers for camera.

Can anyone please help?

This topic has been closed for replies.
Correct answer JoãoCésar17023019

Hi.

 

When advanced layers are on and some of their features are being used in a scene other than the first one - in your case the Camera tool -, you need to prefix the layer's name first. So instead of Replay.addEventListener it would be something like Layer_1.Replay.addEventListener.

Please give it a try and let us know.

 

Regards,

JC

1 reply

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
June 11, 2024

Hi.

 

When advanced layers are on and some of their features are being used in a scene other than the first one - in your case the Camera tool -, you need to prefix the layer's name first. So instead of Replay.addEventListener it would be something like Layer_1.Replay.addEventListener.

Please give it a try and let us know.

 

Regards,

JC

Participant
June 12, 2024

Yes. It worked.

Thank you so much that worked out just fine.

JoãoCésar17023019
Community Expert
Community Expert
June 12, 2024

Awesome.

 

You're welcome.