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

AS3, TextField Auto Scroll

Explorer ,
Jun 11, 2023 Jun 11, 2023

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
546
Translate
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);

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

yes,

 


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

Translate
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

Wow... you are awesome.
Thank you so much.

Translate
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
LATEST

you're welcome 

Translate
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