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