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

1120: Access of undefined property

New Here ,
Jan 25, 2019 Jan 25, 2019

Copy link to clipboard

Copied

Hello, All

I am trying To navigate from scene 3 to  scene 2 through button but i get

1120: Access of undefined property


and after i google all possible solutions and not fix the issue.

i came here to try to find any help to fix this issue.

you will find FLA file attached below

https://www.dropbox.com/s/s6bc60trazgqpxg/Untitled-8.fla?dl=0

Regards

TOPICS
ActionScript

Views

3.4K

Translate

Translate

Report

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
Advisor ,
Jan 26, 2019 Jan 26, 2019

Copy link to clipboard

Copied

is your button existing on all frames?

Votes

Translate

Translate

Report

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
New Here ,
Jan 26, 2019 Jan 26, 2019

Copy link to clipboard

Copied

Yes

Votes

Translate

Translate

Report

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 ,
Jan 26, 2019 Jan 26, 2019

Copy link to clipboard

Copied

Hi.

It's because the Advanced Layers mode is on.

- If you want to keep it on, you're gonna have to reference the layer that contains the button by its name first. Like this:

import flash.display.MovieClip;

import flash.events.MouseEvent;

var headerLayer:MovieClip = getChildByName("Header") as MovieClip;

stop();

headerLayer.btn_01.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_10);

// Alternatively: Header.btn_01.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_10);

function fl_ClickToGoToScene_10(event:MouseEvent):void

{

    MovieClip(this.root).gotoAndPlay(1, "Scene 1");

}

- If you don't want to use the Advanced Layers mode and reference objects in the old way, do this:

Go to the Document Settings (Ctrl/Cmd + J) and uncheck Use Advanced Layers.

Create timeline layers with Animate CC

Regards,

JC

Votes

Translate

Translate

Report

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
New Here ,
May 16, 2021 May 16, 2021

Copy link to clipboard

Copied

Thanks man, I solved the same problem after using your way provided. Thank you so much!

Votes

Translate

Translate

Report

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 ,
May 16, 2021 May 16, 2021

Copy link to clipboard

Copied

Excellent! You're welcome!

Votes

Translate

Translate

Report

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
New Here ,
Sep 24, 2021 Sep 24, 2021

Copy link to clipboard

Copied

Thank you so much !!
you helped me through a school project were I had the issue of the buttons overlapping and this error.

Votes

Translate

Translate

Report

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
New Here ,
Feb 04, 2022 Feb 04, 2022

Copy link to clipboard

Copied

Hi, I used this code and came out this

TypeError: Error #1009: Cannot access a property or method of a null object reference.

May I know how can I fix it?

Votes

Translate

Translate

Report

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 ,
Feb 04, 2022 Feb 04, 2022

Copy link to clipboard

Copied

Hi.

 

In recent versions of Animate it's possible to access instances directly without worrying about advanced layers. Or are you trying to do something else?

 

Please let us know.

 

Regards,

JC

Votes

Translate

Translate

Report

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 Beginner ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

So while the Advanced Layers situation may fix this, we're seeing instances where it's working on one project but not another.

If SOMEONE from Adobe could PLEASE watch this video and tell my while one project with the EXACT SAME CODE works FINE with Advanced Layer and anotherone with the EXACT SAME CODE does NOT work with Advanced Layers I would certainly appreciate it!!

Thank you!

Votes

Translate

Translate

Report

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
New Here ,
Apr 24, 2023 Apr 24, 2023

Copy link to clipboard

Copied

So true, got the same problem with my project and still the only fix is turning off advanced layers, which doesnt really help because i am using camera.

Votes

Translate

Translate

Report

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 ,
Apr 24, 2023 Apr 24, 2023

Copy link to clipboard

Copied

LATEST

watching a video is unlikley to reveal the problem cause.

Votes

Translate

Translate

Report

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