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

AS3.0 TextField Mouse Scroll

Explorer ,
Mar 13, 2023 Mar 13, 2023

This is a question about textfield mouse scrolling
I have multiple lines of text in a textfield of constant size.
If the number of lines of text exceeds the range of the text field
I can not scroll above the text title, but only I can scroll in the empty space next to the text title
Can you please tell me how to make the text scrollable above the title?
Thank you so much


completed => Music Played List
sm => Music List
n => Muic List Array Number
indexNo => Music Played Title Array Number
playedList => textField (Dynamic)

 

completedList();

var tHeight: Number;
function completedList(): void {

	if (completed.length == 0) return;

	var tx: String;
	var addTx: String;

	tHeight = playedList.textHeight;
	var t2: Number = tHeight / 2;
	var lines: uint = Math.floor((playedList.height - t2) / tHeight);

	for (var i: uint = 0; i < completed.length; i++) {
		tx = (i <  9) ? String("  " + (i + 1)) : String(i + 1);
		tx = (i == 0) ? String(" "  + (i + 1)) : tx;

		addTx = tx + " - " + completed[i] + "\n";
		playedList.appendText(addTx);
		if (playedList.numLines > lines) {
			playedList.scrollV++;
		}
	} 
	if (playedList.numLines > lines) {
		playedList.border = true;
		playedList.borderColor = 0x003366;
	}
	playedList.addEventListener(MouseEvent.CLICK, selectTextFieldLine);
	this.addChild(playedList);
}

function selectTextFieldLine(e: MouseEvent): void {

	var index: uint = playedList.getLineIndexAtPoint(e.localX, e.localY - (tHeight / 2 / 2));

	if (index >= (playedList.numLines - 1)) return; 
	if ((index != -1) && (indexNo[index] != n)) {
		n = indexNo[index];
		musicPlay(sm[n]);
	}

}

 

741
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 ,
Mar 13, 2023 Mar 13, 2023

by default, you should able to scroll the text when your mouse is anywhere within the confines of the textfield.  anything else and you'll need to encode that yourself.

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

When the same file is compiled in Flash cs 5.5,

it is possible to scroll on the text,

but I wonder if it is not possible in the Animate CC

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

scrolling, by using the mouse anywhere within the textfield, works for me with animate v23.0.1

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

Unfortunately, animate v23.0.1 does not support Korean language.

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

when compiled

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

you're embedding a korean font and it's not exporting?

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 ,
Mar 17, 2023 Mar 17, 2023

problem solved
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 ,
Mar 18, 2023 Mar 18, 2023

@Choi24652308akbg 

 

you're welcome.  what was the solution?

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 ,
Mar 19, 2023 Mar 19, 2023

There was a problem with setChildIndex

 

I am using animate v22.0.8 version
But sometimes when compiling the same file, scrolling is enabled or disabled within the textfield.
If it is an animate setting problem, I wonder how to set it up

 

One more thing I would like to ask
I wonder why there is a big difference in text readability between swf files and exe files.

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 ,
Mar 19, 2023 Mar 19, 2023
LATEST

readability should be no different for text that uses an embedded font.  if the font's not embedded, differences are expected on different hosts depending on the host fonts.

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