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

Advanced Layers: How to reference layers as objects in ActionScript?

New Here ,
Nov 01, 2018 Nov 01, 2018

Copy link to clipboard

Copied

I have a dynamic text field that was working fine, and still works as long as I turn off Advanced Layers.

However, I would like to fix my code, but so far, I haven't figure out how to refer to the layers in action script so I can update the path to my dynamic text field.

Take the following piece of code as an example:

txt_output.text = nameIn;

I need to add the layer name before the txt_ouput instance but so far, I have no idea how to refer to the layer.

Any help is appreciated it.

Views

416

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

Adobe Employee , Nov 02, 2018 Nov 02, 2018

I ran a quick test for editing the text of a dynamic text-field using the same code as above (with advanced layers enabled) and it worked fine. Can you share your test file to have a look.

In general, you should be able to access the layers using the layer name itself (this.Layer1), provided the layer name is a valid identifier and is not repeated.

Votes

Translate

Translate
Adobe Employee ,
Nov 02, 2018 Nov 02, 2018

Copy link to clipboard

Copied

LATEST

I ran a quick test for editing the text of a dynamic text-field using the same code as above (with advanced layers enabled) and it worked fine. Can you share your test file to have a look.

In general, you should be able to access the layers using the layer name itself (this.Layer1), provided the layer name is a valid identifier and is not repeated.

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