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

AS3, TextField Auto Scroll

Explorer ,
Jun 11, 2023 Jun 11, 2023

Copy link to clipboard

Copied

As a beginner, I often ask questions.


I have a textfield with over 1000 music lists,
Only about 20 lines are shown in the textfield.
Is there a way to display the randomly selected music in the center of the textfield y-coordinate (or the 10th row)?
I would appreciate it if you could post the sample code to me.

 

for (var i: uint = 0;  i < sm.length;  i++)  {
	musicList.appendText(sm[i]+"\n");
}
var n: uint = int(Math.random() * (sm.length - 1));
musicPlay(sm[n]);
TOPICS
ActionScript

Views

160

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 , Jun 11, 2023 Jun 11, 2023

yes,

 


musicList.scrollV = Math.max(0,n-9);

Votes

Translate

Translate
Community Expert ,
Jun 11, 2023 Jun 11, 2023

Copy link to clipboard

Copied

yes,

 


musicList.scrollV = Math.max(0,n-9);

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
Explorer ,
Jun 11, 2023 Jun 11, 2023

Copy link to clipboard

Copied

Wow... you are awesome.
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 ,
Jun 11, 2023 Jun 11, 2023

Copy link to clipboard

Copied

LATEST

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