Skip to main content
Participant
Jun 11, 2024 5:39 AM UTC
Answered

Error 1120 Access of undefined property for Restart button

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 is closed to new replies. Start a new post to keep the conversation going.
JoãoCésar17023019
JoãoCésar17023019Correct answer
Community Expert
Jun 11, 2024 12:58 PM UTC

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

3 replies

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
Jun 11, 2024 12:58 PM UTC

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

Translate
Participant
Jun 12, 2024 3:45 AM UTC

Yes. It worked.

Thank you so much that worked out just fine.

Translate
JoãoCésar17023019
Community Expert
Community Expert
Jun 12, 2024 11:56 AM UTC

Awesome.

 

You're welcome.

Translate