ActionScript 3.0 :: Erase Line Of Text From Textfield?
Dec 27, 2009how do you erase last line of text from a multiline dynamic textfield, or last couple of lines?
View 3 Replieshow do you erase last line of text from a multiline dynamic textfield, or last couple of lines?
View 3 RepliesIm building a pretty simple drawing board in flash, i got this code from this forum and it works fine (there is more to it but this is the drawing part)[code]This works fine. But i want to be able to erase the drawings, step by step this is ths tricky part, ive looked everywhere(ok not everywhere) but in a whole lot of places but the only thing i found is how i could delete everything with removeChild and that in not what i want. Maybe i need to change the function abowe? Please help me to get in the right direction. What should i read about /look at?
View 5 RepliesI have a dynamic textfiled on stage and I am appending some lines of text each time in a new line with "
", so it like expand downwards.(it just currently serves me as a trace output online so I can check something)
what I would like to do is when that textfield reaches certain height that the first line at the top of the textfield gets deleted as a new one appers on the bottom and so on...
in as3 how do i get the text of a textfield to know when to line break according to the width of the textfield.
View 4 RepliesI have this file http:[url].... Basically lines gets drawn where ever I tween the animation.arrow MovieClip. What I'm wanting to do is be able to rewind the MovieClip and have the line erase its self step by step.
View 1 RepliesI am making a flex whiteboard application where lines are drawn over an image here is the scenario:
1: main canvas holding the background image and drawing canvas
2: user can move image by dragging image
3: user can draw over image, which is actually drawing on canvas over image.
I'm having problem on erasing lines like it eraser in paint. Searched evry where but didnot find a way to erase drawn lines
[Code]...
I am sending a dynamic multi-line textField text to a database. Upon receiving it back, it doesn't display it in multi-line format properly. I am also using htmlText, so it stores it all the font / size /etc in the database perfectly.This code shows you the textField attibutes, both the text I create and send to MYSQL, and the text I get back also calls upon these exact attributes
Code:
TF.type = TextFieldType.INPUT;
TF.autoSize = TextFieldAutoSize.LEFT;
TF.useRichTextClipboard = true;[code]......
when I called upon the text from the database. It at least made it multi-line, but it messed it up a bunch also. My text is only 3 lines, but with wordWrap, it made it 8 and made it look off.Anyway, the text / font / color and everything comes in perfectly, except for the multi-line part.
I have this information that is pulled in from a PHP database and displayed in a textfield within flash which works fine BUT when I go to copy and paste that text into another textfield (a note facility) it then means I can't make a line break. I've tried all sorts with the text field and can't see any reason why it wouldn't allow it. Is there something about different text formats that mucks it up?
View 2 RepliesI have an array called dropTarg1 which stores dropped-in items.I want to loop through this array and in a textfield, display each array item on a new line of this text fieldI think I need to use something like Array.join("/n") but I can't get it working properly. I hope that the /n would create a new line of the text field called reviewBoxContentText.
for(var i:Number = 0; i<dropTarg.length; i++){
with(reviewBoxContent.reviewBoxContentText){
autoSize = true;
[code].....
I found this awesome text effect class. Can anyone give me any ideas on how I would go about making this work multi-line? I'd also like it to reverse and erase itself on call.
[code]...
I have a textfield, and I put the field legend inside it. I want the text "type your name" to be erase once user click inside the textfield. How can I do that? And the reverse, if the text was lived empty show again "type your name"?
View 7 Repliesin Flash CS4 I have static text like: Line1 and line2 It's in 9 point Arial Regular as a device font. If I set the line spacing below 3.9 the second line dissappears from the compiled SWF file. It still shows in the FLA file. The same thing happens at 6pt but NOT at 5pt or less.
View 1 RepliesIs it possible to load a text file using line breaks as a delimeter rather than having a &var= at the beginning of each line? Like by a for instance? I have a text file with about 1000 lines that I need to load/display.
View 5 RepliesWhen a Dynamic Multiple line text field is used in Flash CS3, it has a very annoying feature that auto inserts a line break at the end of inserted text. It also auto inserts a line break if no text is entered too.
I'm having a problem with this because the text is being saved from flash to a text file on the desktop. With every multi-line text field there's a nasty looking line break.
Any way of "turning off" this auto-line-break-at-the-end feature?
I'm attempting to add line breaks after the code I've included below. I know that I need to add a " " after the line of text, but I haven't had any success.
textField.appendText(""+ bldg.S11[i].Title.text())textField.appendText("Square Footage: "+ bldg.S11[i].SF.text())textField.appendText("Tenant: "+ bldg.S11[i].Tenant.text())textField.appendText("Status: "+ bldg.S11[i].Status.text())
I have a Dynamic TextField defined in the Flash Authoring Tool set to be multiline (cause the app can receive data from outside and it can be either 1 line or 1000 lines) but unfortunately the flash player just renders 1 line in the TextField, of a total that would have upwards of 100 lines.
I tried the following property:
textField.multiline = true;
but without success.
I use Flash CS4
i have a text field with text within it. Im wanting to get the line number of that text element once its clicked. Using an event listener I can get a specific value
PHP Code:
function clickHandler(event:MouseEvent):void {
trace(myTF.getLineText(0));
}
Of course I would have to use either an if statement or an if statement within a for loop, but what would I check it against?
how can i make a movieclip and a textfield to resize to the content of the text in the textfield? I mean, if I have a textfield with 3 letters font name XXX and then the content of the field change, how can i resize te textfield so the text dont autoadjust to the 3 letter space?
View 3 RepliesDoes 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... The AS I'm using:
[Code]...
I have a Dynamic TextField defined in the Flash Authoring Tool set to be multiline (cause the app can receive data from outside and it can be either 1 line or 1000 lines) but unfortunately the flash player just renders 1 line in the TextField, of a total that would have upwards of 100 lines.I tried the following property:textField.multiline = true;but without success.Does anyone know how can I solve this problem?
View 2 RepliesIs there a way to get the line index from a specific word in a textfield?
View 1 Repliesthe example of my problem is:
I have 2 textFiled there are:
1. myTextFied ( to store the original text )
2. displayText ( to show some line of original text )
I try this:
myTextField.htmlText = '<B>THIS IS A TEXT LINE 1</B>
' +
'<I>THIS IS A TEXT LINE 2</I>
' +
[Code]....
I have a bunch of text I am working with from XML and when I import it into my text field it becomes automatically indented on the first line. Is there a way to lose this indent? If I take off word wrapping it does make the indent go away, but then of course the text spans across further than the text field horizontally.
Here are some of the properties I have assigned to the text field I am using:
ActionScript Code:
myTextField.htmlText = txtPath; //txtPath is the loaded and parsed XML
myTextField.multiline = true;
myTextField.wordWrap = true;
How can I break the last word of a line in a textField so that it will break with a "-" if the word is too long.
The width of the textField is fixed.
I have a text field on the stage with an instance name and is set as a Multiline text field. I'm populating it with data from an XML file.When I test my movie...the text field cuts off the text at the end of the text field and does not wrap to a new line like the Multiline setting.I even added a line of code to say
ActionScript Code:
myText_txt.wordWrap = true;
and still got nothing.
I'm trying to create a background for a textfield like this: When I access the textWidth property it always seems to be the total width. Which is fine for all the lines expect the last. So it possible to access the width of the last line text?
View 8 RepliesI need to send the contents of an input textfield by GET to a php script. The problem is the input must be multiline, but cannot allow line breaks orelse it messes up the GET query. Is there anyway for me to replace the line breaks with a html encoded line break (I tried restricting the textfield to specific characters, but the return still caused line breaks)?
View 2 Replieswhen I put WordWrap on in an input textfield, all characters off the width of the textfield get put on the next line. However, when I look at the htmlText property of that textfield, I see no evidence of such a line break.I've learned that's because it's a soft line break, and not a hard line break. My app has a feature that requries me to know the number of lines in the textfield. I had been calculating this by simply scanning through the htmlText property of the textfield and counting up the presence of "</p>". However, the wordwrap soft line breaks don't leave any evidence of such in the htmlText property
View 2 RepliesI have MovieClip with TextField in, how can I dispatch when change text in TextField or remove TextField or add something else.
View 3 RepliesDoes anyone know a way, to return the length, preferably in pixels, of a specific line in a multiline textfield. In this case, I need to know the length of the last line.
View 1 Replies