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

Noob questions

Community Beginner ,
Mar 15, 2019 Mar 15, 2019

Copy link to clipboard

Copied

I used  AS2 in a basic way for many years and I was able to do everything I needed. Now I've started using animate and I'm struggling with things that used to be easy and also finding solutions to them.

One that's bugging me now is referencing movieclips or buttons that are not present constantly on my timeline.

If I have buttonA on frame 1 and buttonB on frame 2, I assumed that I could put my actionscript for buttonA on frame 1 and for buttonB on frame 2 but this gives errors straight away as "access of undefined property buttonB and buttonA as they are not present throughout the timeline.

How do I resolve this? There must be a way of adding actionscript to elements that are not present on every single frame of the timeline.

TOPICS
ActionScript

Views

303

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

Copy link to clipboard

Copied

I found a solution but it feels like I'm doing this wrong. Basically, if I have all my movieclips/buttons present throughout but with their visibility set to off it works. There must be a better way!

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
LEGEND ,
Mar 15, 2019 Mar 15, 2019

Copy link to clipboard

Copied

When you get the error are the buttons on different layers or in adjacent frames?  You definitely shouldn't be getting an error if you are stopped in 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 Beginner ,
Mar 15, 2019 Mar 15, 2019

Copy link to clipboard

Copied

same layer adjacent 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
Community Expert ,
Mar 15, 2019 Mar 15, 2019

Copy link to clipboard

Copied

LATEST

Hi.

Turn off the advanced layers mode (Ctrl/Cmd + J) and things will probably work the way you expect.

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