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

Is there a limit for a number of line for a text component?

Contributor ,
Apr 26, 2017 Apr 26, 2017

Copy link to clipboard

Copied

I need to paste a text inside a text component.

I need this for a scroll text, but after copying the text I see only a part of this thext and a lot of line beneath the lower frame are invisible.

If I delete some line above the lower frame of text component some lines of the invisible text below the frame appear. It seems like there is a limit of text lines.

Any hint?

Thanks.

Views

1.4K

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

LEGEND , May 02, 2017 May 02, 2017

There does seem to be a limit based on font size and field width. I tried this script, where 't' is a dynamic textfield, and in the field I had pasted the text from this page a few times:

trace(t.numLines);

If I set the font size to 2, it said there were 712 lines. If I used 24, there were 241 lines. If I made the field wider, I would get more lines.

It seems like there's a limit to do with the visible height of the field.

If you do have to have a single list of text that is over 5000 pixels tall, y

...

Votes

Translate

Translate
Enthusiast ,
Apr 26, 2017 Apr 26, 2017

Copy link to clipboard

Copied

not sure if there is a line limit, are you able to see the scrollbar once text is placed in? If not you may need to stretch the text field area to allow for more space

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
Contributor ,
Apr 26, 2017 Apr 26, 2017

Copy link to clipboard

Copied

Thanks rezun8!

Actually I'm trying to make a personal scroll bar.

So I need to use a static text inside an mc.

So, is there a way to stretch the text field area with static text?

At this moment I can't.

I'm sorry I did not explain well before.

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 ,
Apr 26, 2017 Apr 26, 2017

Copy link to clipboard

Copied

Explain why you believe you need to use a static textfield instead of dynamic.

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
Contributor ,
Apr 26, 2017 Apr 26, 2017

Copy link to clipboard

Copied

Because I'm doing a more sophisticated scrollbar without the flash component UIScrollBar, but with a personal mc that need a static text.

It would work well if I could use a larger text field.

Thanks.

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 ,
Apr 26, 2017 Apr 26, 2017

Copy link to clipboard

Copied

https://forums.adobe.com/people/Jhon+Carlo  wrote

Because I'm doing a more sophisticated scrollbar without the flash component UIScrollBar, but with a personal mc that need a static text.

That doesn't answer my question, all you did was just repeat that it needs to be static text. WHY does it need to be static text?

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
Contributor ,
Apr 26, 2017 Apr 26, 2017

Copy link to clipboard

Copied

I tried also with the text set as dynamic but it is the same I can't  stretch the text field area.

Thank you both.

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 ,
Apr 27, 2017 Apr 27, 2017

Copy link to clipboard

Copied

If you're going to persist in refusing to answer the question, we can't help you.

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
Contributor ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

I rephrase the question:

I a new project (as3) only with a single text component, dinamic or static, are there a limit of text lines?

If I create a new as3 project and a new text, dinamic or static is the same! If I paste inside a text (about five page of text - about 6.000 chars iside. Text field width = 600), I can't read all text and with dinamic text I can't stretch the field in vertical direction.

Is there a way to have more text visible?

(Five text pages with about 6.000 chars and a field text width 600).

Thanks.

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 ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

You keep saying you want to "stretch" the textfield. Stretching distorts the textfield content. I hope you actually mean you want to resize it.

I'm certain that text fields can be at least as tall as the visible screen. Why is that not enough? If you want to have more text than it can display at once, that's why they support scrolling.

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
Contributor ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

I mean enlarge the field not to stretch the text, if you like more "resize" it is so.

But maybe the right answer to my question unfortunately is YES, there is a limit to line text and this limit is about 250 line, after you can't write also if you limit the field to the stage size or not. Also if you use scroll or not, and the width is not important. 

Is it also the same for you?

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
Contributor ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

... char = 20 pt

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 ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

I just tested and was able to make a textfield 1000 lines tall. It could have gotten even taller but the exercise seemed so silly I had to stop. Then I created a textbox and filled it with about 100K of lorem ipsum text. It handled it with no problem.

But you still haven't explained WHY you need a textfield so large that it wouldn't even fit on the screen. Why don't you put your text in a scrolling textfield?

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
Contributor ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

I have tried again the same result: no more than 250 lines!!!

I also tried the classic scrolling textfied (as I've said this in my previous message), same result!!!

There is someone who can say why ClayUUID can make a textfield of 1000 and more lines and I can't?

For me no more of 250 (char = 20 pt) in a scrolling textfied.

Thank you!

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
Enthusiast ,
Apr 26, 2017 Apr 26, 2017

Copy link to clipboard

Copied

you used to be able in Flash to customize the default components like a scroll bars color. Not sure if you can still do that in Animate. Cant see why not.

I agree with Clay you shouldnt use a static textfield for this, it needs to be dynamic.

this should help increating custom components - Example of a HTML5 custom component

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
Contributor ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

Does anybody, but ClayUUID, can test if a text component (even dynamic)

can contain more than 250 lines, or tell me why I can't have a text with more lines?

Thanks.

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 ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

There does seem to be a limit based on font size and field width. I tried this script, where 't' is a dynamic textfield, and in the field I had pasted the text from this page a few times:

trace(t.numLines);

If I set the font size to 2, it said there were 712 lines. If I used 24, there were 241 lines. If I made the field wider, I would get more lines.

It seems like there's a limit to do with the visible height of the field.

If you do have to have a single list of text that is over 5000 pixels tall, you could split the text between more than one textfield, put them all into a movieclip, and then scroll the position of the movieclip.

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 ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

I tested under Windows 10 as well as Mac, and it's the same situation there.

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 ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

If the limit is pixel height, not content, he should be using a scrolling textfield. Bolting together multiple massively oversized textfields can't be good for performance.

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 ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

I tested with a TextArea, and that seemed more hopeful. But, part of the task was to make a personal scroller. It ought to be possible to turn off the normal TextArea scrollbars and then set the scroll based on your own custom widgets.

Here's the documentation for TextArea, and I think it would be scrollRect that you would need to change:

TextArea - Adobe ActionScript® 3 (AS3 Flash) API Reference

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 ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

The TextArea component seems like overkill when a plain vanilla textfield set to scroll would work just as well.

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 ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

LATEST

Interesting thing, it seems that adding text with code doesn't have the same issue that adding the text manually has.

The scrollV of a textfield seems to be a whole line at a time, and I would guess that the intention is to have smooth scrolling. TextArea is the same. Having the text in a movieclip, even if it's in a single textfield, might give nicer scrolling.

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