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

Help Needed with closing a menu

Community Beginner ,
Jan 15, 2019 Jan 15, 2019

Copy link to clipboard

Copied

Hey,

I hope you can help, I think its very simple but I am jsut starting.

1.PNG2.PNG

I want to close my menu. The picture(converted into movie clip) is in the layer "Button_an" on frame 10.

therefore I created an empty keyframe on frame 10 with the following code:

menu_close.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);

function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void

{

    gotoAndStop(1);

}

I already checked the name - its correct

I already checked if the code is in the right frame action (its 10, thats correct)

3.PNG

however, there is an error saying, that my menu_close is not beingt defined (error: 1120:Access of undefined property error )

thanks for hleping out!

Views

611

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

correct answers 1 Correct answer

Community Expert , Jan 17, 2019 Jan 17, 2019

a better solution:

disable advanced layers (modify>document>untick 'use advanced layers').

info about advanced layers: https://helpx.adobe.com/animate/using/timeline-layers.html#advanced-layers

Votes

Translate

Translate
Community Expert ,
Jan 15, 2019 Jan 15, 2019

Copy link to clipboard

Copied

menu_close does not exist when the error message is triggered.

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

Copy link to clipboard

Copied

Hey, tahnks for replying.

As shown in the screenshot, it does exist - dunno why the error massage states that

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

Copy link to clipboard

Copied

you didn't show that it exists when the error message is triggered.  you showed it exists at some point/time.

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

Copy link to clipboard

Copied

4.PNG

it exists but somehow still triggers. Any suggestions?

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

Copy link to clipboard

Copied

here is a better screenshot with the isntance name

4.PNG

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

Copy link to clipboard

Copied

remove that tween (which changes your menu_close reference).

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

Copy link to clipboard

Copied

what exactly do u mean with removing the tween?

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

Copy link to clipboard

Copied

right click the tween span > remove tween.

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

Copy link to clipboard

Copied

I dont created a "tween". I just made a picture into my timelane (Layer "Button an") and put 1 picutre over 10 frames in it (including the drop downmenu and the close button (arrow) and that arrow I converted into a movieclip and want to, by clicking, get back to frame 1

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

Copy link to clipboard

Copied

why is your timeline, at that layer/frame span, blue?

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

Copy link to clipboard

Copied

bexause i clicked on it - meaning its the selected layer, which my movieclip "menu_close" is on

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

Copy link to clipboard

Copied

upload your fla somewhere and post a link.

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

Copy link to clipboard

Copied

ok, thanks so much

https://ufile.io/s0y8a

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

Copy link to clipboard

Copied

i can't determine what you've done setting up that file to cause all the problems you're going to have.

my suggestion is to start with a new fla and careful add items and code in steps, checking for errors frequently.

if you just want to resolve the current error, click the problematic frame in the timeline (to select all items)>right click over the stage items>click distribute to layers.  test.

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

Copy link to clipboard

Copied

I did it again very clean, still not working

somehow if I have the close button from frame 1to10 - it works, but I want the button only to appear when opening the mnu on frame 5 - any suggestions?

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

Copy link to clipboard

Copied

again, if you just want to resolve the current error, click the problematic frame in the timeline (to select all items)>right click over the stage items>click distribute to layers.  test.

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

Copy link to clipboard

Copied

ok, oh mygod it worked thank you so much - can you explain why tho? I dont get it? cant there be 2 items in 1 layer in the same frame?

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

Copy link to clipboard

Copied

LATEST

a better solution:

disable advanced layers (modify>document>untick 'use advanced layers').

info about advanced layers: https://helpx.adobe.com/animate/using/timeline-layers.html#advanced-layers

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

Copy link to clipboard

Copied

Sorry, I mean "exists at runtime", when the code executes. Normally, the code executes first, and then, the graphic elements. This is why, maybe, if you delay your function (using a timing event), the error is gone.

Marlon Ceballos.

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

Copy link to clipboard

Copied

so what code do I include or? .. sorry I am a beginner 😕 cant quite understand

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

Copy link to clipboard

Copied

You need to be sure that the function run after menu_close exists. Maybe, this event can help you: www.w3schools.com/js/js_timing.asp

Marlon Ceballos.

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

Copy link to clipboard

Copied

I used this function on my first frame for another movieclip, it does work, it only works in the first frame tho ..

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