Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Devide Textfield In Lines


hello,
what I want to achieve, is that I want to split up lines in a textield. I have a multiline textfield, that I split up in separate lines with textfield.text.split("
").
this works fine for lines that are followed by the user clicking the "enter key".
But when a line is too long to fit in the textbox, the line jumps to the next line, but isn't concidered a new line.
Is there a way that i can split this up too??

Hope someone knows the answer




FlashKit > Flash Help > Flash MX
Posted on: 06-30-2003, 08:30 AM


View Complete Forum Thread with Replies

Sponsored Links:

How To Find Number Of Lines Of Dynamic Text...and How Many Lines In Textfield
is there any way of finding out how many characters will fit in a dynamic textfield?

I have a textfield that is dynamically loaded with text. Sometimes the text is long and i need scroll buttons, but when the text is short i would like not display the scroll buttons.

How can i figure out if text is short enough not to display the scroll buttons?

oh..to make it even more complicated; the font of the text is not always the same. I use textformatting to display header-like lines in the textfield.

View Replies !    View Related
Devide Flash Window
hi,
i want to play diff.swf's in one flash window.and i want to devide window in to parts.anybody can help me how to do that.iam eagarly waiting for u r replies.

thank u.

sudheer.

View Replies !    View Related
Nr Of Lines Of Textfield
Is there a way in AS2 to determine the number of lines that a textfield has ? (or the complete length and this / width would give the number of lines)

View Replies !    View Related
Textfield Lines
hello.
I am trying to sync a movieclip _height property with a dynamic textfield _height property.
The MC is just a line that expands vertically so it aligns with the bottom of the dynamic textfield as its size changes (autosize).
This textfield changes on frame events that calls diferent txt variables containing text.
here is what i have on each frame:

misson = eval("_level0/:missao");
info.htmlText = misson;
info_line._height = info._height;

Everything works fine...however when the text field becomes too big the info_line MC doesn´t align perfectly to the text, it becomes too short. Looks like there is some sort of vertical text increment that screws this up by a small but irritating amount of pixels.

View Replies !    View Related
Lines In A Textfield
How can I get a variable containing the number of lines in a textfield?

It seems simple but I can't figure it out.

View Replies !    View Related
Lines In A Textfield
How can I get a variable containing the number of lines in a textfield?

It seems simple but I can't figure it out.

View Replies !    View Related
Add New Lines To A Dynamic Textfield
Hi I have a text field with(multiline and wordwrap)...What I want is that when a user clicks a button the text should appear on the 1st line of the textfield ...when clicked again it should appear on the second line of the textfield.. and so on..

In short with every click.. the desired text should appear on a new line in the textfield


Thanx

Flash MX2004 7.2

View Replies !    View Related
Split Lines In Textfield
Hi.

I have a textfield containing text on several lines. How do i separate the lines so that i can store each line in its own variable?

i have tried with split("
") , but that did not work. any other ideas?

bmolbach

View Replies !    View Related
Breaking A TextField Into Lines.
Is there a proper way to break a multiline text field with wordwrap into lines?

Here is the hack I came up with:


PHP Code:



for(var i=0; line=tf.getLineText(0); i++){
    tf.text = tf.text.substr(line.length);
    lines[i] = line;





See, getLineText(1) is undefined, because since it word wrapped, it is technically 1 line line. Thanks to my near-god-like skills, I was able compensate, but I still wonder if there isn't a better way. This way works fine, but doesn't seem to work with htmlText.

View Replies !    View Related
Space Between Lines Of A Textfield?
Hey guys.

I just got Flash CS3 and I can't seem to find the option for adjusting the space between lines of my textfields.. is there anything I'm missing or can I do it through AS?

Thanks,

Luke

View Replies !    View Related
Number Of Lines In A Textfield
Hi all

Seem to have gone a bit dumb tonight. Anyone know how to get the number of lines in a textfield?

Cheers

Dan

View Replies !    View Related
Get Number Of Lines In Dynamic Textfield
Hi there guys,

I made a textfield which loads it's content from a textfile, this text can vary in length. Below this textfield I'd like to display a button in a movieclip that always has the same distance from the bottomline of the text.

Can I detect over how many lines the text is wrapped in a dynamic textfield?

Greets

View Replies !    View Related
Count Number Of Lines In Textfield?
Is it possible to count the number of lines in a textfield? This because I want to change the border I made around the textfield and give it the same height (1 line -> graphic of 20px, 2 lines, graphic of 40px )

View Replies !    View Related
Get Total Lines In Dynamic Textfield?
hey everyone...
I've created a scroller for a dynamic text field... I'd like to set it's visibility to true or false depending on whether or not there is a certain number of lines...
something like:

if( totalLines < x){
scroller._visibile=false;
}

how do I get the total number of lines?

As always... thanks for any help.

View Replies !    View Related
Limit Number Of Lines In A Textfield
Hi there!

i need to limit the number of lines in a text field... Can any one help?

I know how to limit the number of characters, but that's no good. I need to limit the text field so that it prints in 2 pages. First I just counted the number of chars, but someone could insert several returns, the max number of chars would not be reached but it would still not fit in the printed page.

Thanx!!

View Replies !    View Related
Limit Lines In Input Textfield
I'm trying to limit the number of lines people can enter in an input textfield.
I tried stuff with maxScroll, but that doesn't check if people press enter, so i end up with too many lines of text. I then looked at maxChars, but it's no use either, because users can still enter as many lines as they want.

Is there no way you can combine maxChars and maxScroll? there also is "textfield.onScroller" which checks if the textfield is being scrolled. Can't i use an eventhandler based on onScroller? Like:


Code:
textfield.onScroller = function() {
tekstveld.maxChars = textfield.length;
};
this results in people not being able to edit messages anymore after they reach the end of the textfield.
I have no idea how to limit the number of lines in an input textfield. Anyone?

View Replies !    View Related
Textfield Number Of Visible Lines
Hey all,

short question: is there a way to easily find the number of visible lines in a multiline Textfield?

Thanks for any help!
Jay

View Replies !    View Related
TextField Maximum Number Of Lines
My AS class is creating dynamic TextFields that word-wrap with multiline. Some of the text that goes in these TextFields is rather long, so I'd like to limit the maximum number of lines that the TextField can have. Is there an easy way to do this?

View Replies !    View Related
Find Numbers Of Lines In A TextField?
i made this dynamic textfield which loads an external .txt-file, with up/down-button for scrolling/viewing the text.

i want to add a slider instead of the up/down-buttons. the slider is done but the problem i need to find out how many lines the textfield consist of. this is because i use a easy %-formula to calculate how much to scroll up/down according to the slider position.

anyone knows a way to find out the number of lines in a dynamic textfield?

View Replies !    View Related
Best Way To Count The Number Of Lines In A TextField
I have a TextField being created and populated at runtime. How can I go about getting the number of lines of text it contains? I have wrapping turned off if that helps.

View Replies !    View Related
[Q] How To Change Lines In Dynamic Textfield
Hi, I am struggling to change lines of loaded text from xml.

Basically I wrote few sentences in one child of xml file but when i loaded it to dynamic textfield I cant change the lines.

(i tried with <br> /n both didnt work, textfield was multilined)

thank you for your time

View Replies !    View Related
Total Amount Of Lines In Textfield?
Im i being a spoon here?is there a way you can find out how many lines of text there are in a dynamic textfield?I would like to display some buttons to scroll up and down but only if there is an overflow on my textfield.Is this pos?
Thanks

View Replies !    View Related
[fmx] To Limit Lines Input Textfield
is there a way to limit the user from entering more than lets say 4 lines in an input textfield?

View Replies !    View Related
Extract Lines From Dynamic Textfield
hi everyone

i have a texfield wich has wordwrap enabled and i append a text every X seconds,
after a while my textfield gets very large and that causes my movie to slowdown so when this happens i want to clear the text and just leave the last 10 lines

i know how to get the number of lines (maxscroll) but i dont know how to extract the last 10 lines.

i have searched for this in the forum but couldnt find an answer.

any clue ?

View Replies !    View Related
Total Number Of Lines In Textfield?
Hi there,
Is there a way to get the total number of lines from a textfield? (including the ones that are not visible and need to be scrolled)

View Replies !    View Related
Count The Lines And The Characters Per Line In A Textfield
hi,
need a method to count the lines and the characters per line in a textfield. is there a chance?
thanks.

View Replies !    View Related
Best Way To Read Out The Content Of Specific Lines In Textfield
hi,
what would be the best way to read out the content of specific lines in a textfield.
thanks.

View Replies !    View Related
Detect Number Of Lines In Dynamic Textfield
I've been trying to detect the number of lines used in a dynamic textfield without any luck. I have tried using the scroll property of a field which didn't work (Find my attempt attached) Does anyone have any suggestions?

Thanks.

View Replies !    View Related
Detect Number Of Lines In Dynamic Textfield
I've been trying to detect the number of lines used in a dynamic textfield without any luck. I have tried using the scroll property of a field which didn't work (Find my attempt attached) Does anyone have any suggestions?

Thanks.

View Replies !    View Related
Determining The Number Of Lines Of Text In A Dynamic Textfield?
Hi folks,

Is it possible to determine the number of lines in a dynamic textfield?

I'm importing xml on the fly and want to be able to determine the size of the textfield or number of lines of text imported. If Flash can determine .scroll and .maxscroll then it must know the number of lines of text. How do I access this?

Any ideas?
Thanking you

DM

View Replies !    View Related
Dynamicaly Setting Number Of Lines / Height Of A Textfield?
Hi,

is there a way to dynamicaly set the number of lines in a textbox. I've made a scrolling function that scrolls the clip the text is in and not the textbox itself. Thsi way the scrolling is much smoother. Now ofcourse, I have to set the number of lines (or height) of the textbox dynamicaly.

Is there a way tro do this?

cYa

Ivo

View Replies !    View Related
Determine Number Of Lines In A Textfield Before 'maxscroll' Has Changed ?
Hi there,

I'm trying to determine the number of lines of text in the (dynamic)textfield before the 'maxscroll' value has changed or the textfield is full.
Normaly you would determine the lines of text by adding up the 'maxscroll' value with the number of ('possible') lines in the textfield, right?
But how to determine the number of lines any time? Character width is variable so... Any suggestions?

ThanX, cYa.

View Replies !    View Related
TextField - Number Of Lines, Number Of Characters
Hello,

I'm trying to get some insight on the textField object in flash.

I know how to get the textfield length and number of characters. But I need to know more.

Is there a way to get the number of characters on a line in a multiline textfield?

Thank you in advance.

View Replies !    View Related
Bad Images - Straight Lines Are Jagged Lines - Why?
Hello -

Wondering if anyone had a solution --- I have some images for a portfolio - almost all of them have a diagonal line that's supposed to look straight, and in flash it's looking jagged and wiggly.

I began with 300 dpi images - saved them to the proper size, no compression, saved PNG's, then imported to Flash with lossless (jpg,png) setting, created Graphic Symbol with all graphic information in the upper left quadrant, and it is in an even space on the stage (no 113.4, but 113.0)....

I did a lot of research to make sure I got the best quality images & have taken all of these steps and it's still coming out crappy....

Any ideas? Much appreciated...

View Replies !    View Related
Some Problems Drawing Lines Over Other Lines...
Hi.
I'm designing a character for a movie I'm gonna make, but I'm having some trouble. I recently decided to change the colors of the lines I used, so I switched them around a bit to match the fills but some of the lines I changed the color of now overlap the lines that are supposed to be in front. I tried to draw the 'good' color over them again but at the moment I release the button the lines I draw disappear again and the others overlap them. Any help? I'm using mx 2004.

Thanks in advance

View Replies !    View Related
Lines, Lines, Lines....and Their Movement...
How do i make a line to move, grow, shrink, follow a path...i thought about masking but i believe there must be an easier way of doing it via actionscript...am i right?

please help...
Thanx a lot for your time...

:eek:

View Replies !    View Related
Draw Lines By Mouse Drag And Erase Same Lines By Mouse Click.
Put the following script on frame ..



var i=0;
var sxcord;
var sycord;
var excord;
var eycord;
onMouseDown=function(){
i++;
sxcord=_xmouse;
sycord=_ymouse;
createEmptyMovieClip("temp_mc", 20);
onMouseMove=function()
{
temp_mc.clear();
temp_mc.lineStyle(1, 0xff0000);
temp_mc.moveTo(sxcord, sycord);
temp_mc.lineTo(_xmouse, _ymouse);
temp_mc.lineStyle(6, 65280);
temp_mc.lineTo(_xmouse + 0.500000, _ymouse);
temp_mc.moveTo(sxcord, sycord);
temp_mc.lineTo(sxcord + 0.500000, sycord);
}



}
onMouseUp=function(){
temp_mc.clear();
onMouseMove=null;
excord=_xmouse;
eycord=_ymouse;
createEmptyMovieClip("line"+i, i)
with (eval("line"+i)){
lineStyle (1, 0x0093DD, 100); // this is the colour of the final line.
moveTo (sxcord, sycord);
lineTo (excord, eycord);
endFill();}
eval("line"+i).onPress=function(){
trace(this._name)
removeMovieClip(this._name)


}



}
//++++++++++++++++++++++++++++++++++++++++++++++++++ +=

Enjoy !!!

View Replies !    View Related
Newbie: Actionscript Long Lines Don't Wrap How To Break Long AS Lines?
Newbie question,
I'm writing .htmltext and have very long lines in my ActionScript panel I want to be able to
wrap the lines so I can read them without side scrolling. It's dumb but how do I wrap the
AS lines without starting an new line like I had entered a ";"

Thanks,

View Replies !    View Related
Loading Text & JPG Nito TextField Makes Textfield White
Hi guys !

Does anyone know, why a textfield may become white when loading text + JPGs into it? Sometimes it happens to me, sometimes not. I haven't figured out why.

If you have any clues... I'd be really thankful

The AS I'm using:

_target.container.t.html = true
_target.container.t.condenseWhite = true
_target.container.t.autoSize = "left";
_target.container.t.htmlText = _data.texto

The String ( &HTML ):

"Text lorem ipsum bla bla ..... <img style='WIDTH: 154px; HEIGHT: 59px' height='298' width='856' alt='' src='http://www.spacilong.com/arq/img/AlcatelLucent_Hor_2col_sm.jpg' />

View Replies !    View Related
Textfield Woes, How To Anti-Alias A Dynamic Textfield?
this is driving me nuts, even if i have it marked so that my dynamic textfield is anti aliased, it still looks as if its text is aliased. And if i simply make that textfield Static, the text all of a sudden looks amazingly crisp and anti aliased.

How can i fix this?! I am attempting to load xml data into my text fields but its wasted if the text looks like crap..

So can anyone enlighten me on how to do this? i tried searching Flashs help, all i came out with was "Textfield._quality" but i do not understand what the description means exactly.. And i tried coding my textfield to _quality = "BEST";, with no avail.

Please help, i'v seen other websites with what i am sure is dynamically loaded fields, and smooth looking text... so what gives?

Thanks!

View Replies !    View Related
[textfield] How To Check If Input Text Is More Than Textfield Height?
Hi guys, Is there a way to check if the text that has been input into the textfield is more than the height of the textfield.

I have set the scrollbar hidden and it will become unhidden once the text is greater the the textfield height.

I did try to count the input text and set the visiblity of the scrollbar against that count. Unfortunatly this is unreliable.

Anyone got a better idea?

Cheers
Paul

View Replies !    View Related
[textfield] How To Check If Input Text Is More Than Textfield Height?
Hi guys, Is there a way to check if the text that has been input into the textfield is more than the height of the textfield.

I have set the scrollbar hidden and it will become unhidden once the text is greater the the textfield height.

I did try to count the input text and set the visiblity of the scrollbar against that count. Unfortunatly this is unreliable.

Anyone got a better idea?

Cheers
Paul

View Replies !    View Related
Link In Dynamic Textfield To Jump To Section Of Same Textfield
Howdy all,

I know you've all seen this before - you are on a website and you click a link and you stay on the same page but jump down to a different section of the page. Like an FAQ page or something where all the questions are listed above but you click on one and jumps down to the answer below.

Is it possible to do this in a dynamic (scrollable) textfield with externally loaded text files in Flash? I don't have DW and I know that there are limited html tags available but if anyone knows an easy way to do this please let me know!

thanks!

View Replies !    View Related
After Killing The Focus On A Textfield, The Textfield Remains Selected. Why ?
Hi.
I have a serious problem with the deselecting text when I kill the focus on a textfield.
to see better what I am trying to say, please clcick this link: http://www.eurogaz.ro/rring/expert/

View Replies !    View Related
Link In Dynamic Textfield To Jump To Section Of Same Textfield
Howdy all,

I know you've all seen this before - you are on a website and you click a link and you stay on the same page but jump down to a different section of the page. Like an FAQ page or something where all the questions are listed above but you click on one and jumps down to the answer below.

Is it possible to do this in a dynamic (scrollable) textfield with externally loaded text files in Flash? I don't have DW and I know that there are limited html tags available but if anyone knows an easy way to do this please let me know!

thanks!

View Replies !    View Related
Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help

View Replies !    View Related
Passing Data Form A Textfield To Another Textfield
ok, how can i grab/store information from a specific textfield instance in scene1 and pass it over to another textfield instance in scene2??

need help, its been bugging me for dayz! <:O

View Replies !    View Related
[F8] Input Textfield Inside A Dynamic Textfield?
Hi,

Is it possible to place an input textfield inside a dynamic textfield?

I'd like to replace the variable, this.nTotal, below with an input textfield.
Is there some way to do this?

this.txtComplete.text = "There are " + this.nTotal + " pages in " + this.sGirlName + "'s book.";

Thanks!

View Replies !    View Related
Textfield In ScrollPane > Textfield Only Accessible With Clicking Twice
hi!

i have a scrollPane on the stage which contains an editable textfield.
unfortunately i can only access the textfield in the pane when i click on it twice. it seems that the first click goes for the activation of the pane and then comes the textfield.

does anybody have an idea how to solve that problem?


// Text Field
var myTextField:TextField = new TextField();
myTextField.text = "Please insert text";
myTextField.selectable = true;
myTextField.type = TextFieldType.INPUT ;

// ScrollPane
var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.source = myTextField;
addChild(myScrollPane);

View Replies !    View Related
Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

View Replies !    View Related
Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved