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

Working with multple dynamic text fields

New Here ,
Mar 16, 2021 Mar 16, 2021

Copy link to clipboard

Copied

Hi, I am currently working on displaying some Patches in Animate.

Is there a way to controll multiple dynamic text fields with one line of code?

 

My example: 3 dynamic text fields with the instance name myText

and the according code snipped: this.myText.visible=false;

 

Unfortunaly only the first myText diapears.

Can someone help me how to let the other two texts disapear?

 

TOPICS
ActionScript , How to

Views

153

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 2 Correct answers

Community Expert , Mar 16, 2021 Mar 16, 2021

never use the same reference for different objects.  ie, change your textfield names (eg, tf1, tf2 etc)

Votes

Translate

Translate
LEGEND , Mar 16, 2021 Mar 16, 2021

Specifically, never use the same name for multiple objects within the same object. For example:

 

NO, OF COURSE THIS WON'T WORK:

myClip.text1

myClip.text1

myClip.text1

 

WORKS FINE:

myClip1.text1

myClip2.text1

myClip3.text1

 

Votes

Translate

Translate
Community Expert ,
Mar 16, 2021 Mar 16, 2021

Copy link to clipboard

Copied

never use the same reference for different objects.  ie, change your textfield names (eg, tf1, tf2 etc)

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

Copy link to clipboard

Copied

LATEST

Specifically, never use the same name for multiple objects within the same object. For example:

 

NO, OF COURSE THIS WON'T WORK:

myClip.text1

myClip.text1

myClip.text1

 

WORKS FINE:

myClip1.text1

myClip2.text1

myClip3.text1

 

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