ActionScript 2.0 :: Create Multi Line Text?
Feb 5, 2008If so, how do you handle line wrapping - so that the lines break at a particular word?
View 2 RepliesIf so, how do you handle line wrapping - so that the lines break at a particular word?
View 2 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 need to create a multiline input textfield. The following code works for single line, but not multiline. What can I do?
[actionscript 3, CS4, PC, ("p1empty" and "p1compare" are frame labels)]
on (release){
if (input1.text == ""){
[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 a project which, for all intents and purposes, attempts to create an online text editor/word processor. The key thing is that I need all multi line formatting to be retained and sent to the server. ie, if the user enters a bunch of text (all colors/bold/fonts and stuff are working great) which has a carriage return or a line wrap, I need a way of tracking that and inserting some kind of flag to let the server now to break to the next line at that point.this project is a client/server application so just storing the text string and expecting flash to be able to use the same size text box will not work.
I have created a function that detects keypresses and MOSTLY takes care of the carraige return issue (still not as solid as I'd like though). Basically, every time the user presses return, I store the length of the string and, when parsing the data for transfer, I insert newline chars at every index point where one is needed. This mostly works unless the user goes BACK and enters a return (still working on that little issue).But the word wrap part is killing me. I did find several discussions of using either total characters to determine how big the box is and where to break the line, or something along those lines, but here's the main issue with that:everything is dynamic. the user can change almost everything, from text font (so there will be variable font widths) text size (again, variable widths) to textbox size (so I can't go with a fixed pixel size to break the text). I've noticed that it was very easy to make a text box vertically dynamic, but the width seems to want to stay fixed (if set to multi-line) since the user will be changing this width, I'm just stuck.
if it means coding a huge set of functions that compares every possible font (i will be using embedded fonts eventually so they will be limited) with every possible size and then using that data to determine box size, that's fine, I'll do whatever I can to get this working, but there just has to be an easier way
expand all multi-line comments in FDT 4?
View 1 RepliesI have a problem with my ItemRenderer in Flex. I'm developping a mobile application and I'm using a list. One of the items is to set a date. But when the date is wrong I want to set a text in my messageField like : The To date must be after the From date.The problem is I don't know (and don't seem to find it anywhere) where you can set the messagefield in multiline.I read on a forum that's possible but no explanation how.Here you can see an example of what I want (the 5the item in the list is using multiline).[code]
View 1 RepliesI'm reading a 2d array from a .txt file, this is what I do:
Code:
[Embed(source = '../lib/lvl1front.txt', mimeType = "application/octet-stream")]
private var frontTxt:Class;
Then a bit further:
Code:
var fgString:String = new frontTxt();
foreGround = stringToArray(fgString);
The stringToArray function is where things go horribly bad:
Code:
private function stringToArray(input:String):Array
{
var output:Array = new Array();
[code]...
Notice the starting comma on every line except the first? I think it's the newline character somehow interfering, but I've tried everything I can think of, and nothing has helped.
I am populating a dynamic text box with some xml elements that I am calling on. For example, I have two text fields and am filling them using
texttime.texttest.text=(bktrlXml.row[e.currentTarget.ivar].tester);
texttime.textname.text=(bktrlXml.row[e.currentTarget.ivar].NAME2);
How could I populate one dynamic text field using a combination of the two elements above? I'd also like to put a line break between the two elements.I tried something like this and could not figure it out
texttime.texttest.text=(bktrlXml.row[e.currentTarget.ivar].tester)+"/n "(bktrlXml.row[e.currentTarget.ivar].NAME2);
i am given a rectangle of some height and width, i want to fill this rectangle with some dummy single line text. the height and width of text should be close to that of given rectangle. basically, i want the text to full occupy a given rectangular area.
eg: if rectangle height and width is 100 and 300 respectively, then the single line text height and width should be close to 100 and 300 respectively,
I have two requirements for a flex charting component:
1) The grid lines should always remain fixed to a scaling I define using an array of data. Something like a graph paper sheet.
2) Plot multiple line series data over this grid.
How does one get complete control over the background grid lines? I have tried a combination of annotation elements and setting the linechart background elements. If I get the grid right, I can't plot over it (Probably due to the scale). how would one go about designing a graphpaper like interface for linecharts in flex/actionscript?
I am using flex4, I am seeking the answer to create multi window web application. My application is some sort of complex, currently I only know using PopupManager to create a new window.Should I create each MXML for each window that I want to instantiate? And then load the mxml and put it into the stage? Is there any tutorial describing that? I want the program modular and easy to manager, extend.
The current way I am using is use Group to group up all the controls inside a window, and if user want to open that window, I will display the group and bring it to the front. Is it the right way to do windowing? But I can't support drag.
I want to know if there is any native support for draggable window, or dialog?
Also till now all the controls are put inside a single mxml file, is it possible to put one window(or one group) to be a separate mxml file?
How can you display a multi-line column header using the Flex Spark Data Grid for Flex 4.5?
View 5 RepliesI have a need to create and publish a multi-frame form. It will use mostly Dynamic text boxes and checkboxes. I have all of the instances named but now need a starting point to get it to POST to a PHP script.
View 3 RepliesI'm trying to create a multi-level dungeon adventure in Flash CS4. The layout is an instance created of a symbol called Level, within the symbol are multiple wall subsymbols (wall), instances of Wall. There is a collision routine to stop the player walking through the walls, called from Wall.As.Level is drawn about the centre point (0,0).When I create an instance on the stage of Level (level), the collision tester is using the xy coordinates for the walls drawn about 0,0, not the "real" xy where it's appearing on the stage. So what I need to know, is how to "update" the xy for each wall subsymbol with the live stage information, overriding the XYs drawn in the parent. It has to be updated unfortunately (I can't keep it static), as the levels are big so have to scroll.
View 3 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 RepliesI'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 hope this isn't too vague, but I'm stuck on a problem that has put me in an Unfortunate Position. I'm Flash developer getting my feet wet with with AS3 and am trying to build an interior decoration tool for a client. My thinking so far has been: create the basic user interface, get the screen flow down, and then finally use a couple of simple arrays to store user selections and stuff like that.
Naturally my 'couple of simple arrays' is totally inadequate to model the many user decisions that my program has to take into account. So I find myself trying to create an enormous, multi-dimensional array with several layers of nesting and before Panic sets in. Here's an example of my thinking for the 'bedding' component of the application in pseudo ActionScript:
[Code]....
... keep in mind that this is just a fraction of what goes into bedding and there are several other of these kinds of arrays that would go into a room like flooring and walls and funture... all equally complex. And I'll need to frequently access different combinations like, how many options under bedding have no value associated and things like that.
So, I realize I'm out of my league and am going to get hurt on this,My questions are:
1) Could it be that using nested arrays like this actually isn't such a bad thing and I should just stick it out? That would suprise me, but I want to make sure I'm not already on the right path.
2) If not, where do I go from here if I want to do this right?
Off the top of my head I feel like I could maybe make everything class based. So my sheets are a class and beds have instances of sheets and rooms have instances of beds... etc. It think it would be complicated but might be the way to go. Or maybe, I go the XML route and store all of the room options in nested blank XML nodes that a user then populates as they move through the application. These are my thoughts but I'd like to hear what more experienced members of the community say.
Hi,I'm trying to use NetStreamPlayTransitions.SWITCH to create a multi angle view that switches between video streams. The issue I'm having is that NetStream.Play.TransitionComplete is called only after the buffer for the video before it is used up(this makes sense when using SWITCH to go between bandwidths but that's not what i'm using it for). Is there a way to force this switch before the buffer of the previous video is used up?
I've looked into SWAP but I can't really find any documentation on it. What I ideally would have happen is the next video in the array is triggered, that video is buffered and when there is enough to play it the stream switches to that one. SWITCH works really nice because there is no jump in switching when it's played but I just don't want the buffer to play out before the switch.Is there a way of maybe clearing the buffer of the playing video before i call SWITCH so it transitions quickly?
How do I remove line 1,2,3 and retain line 4?
Like:
Programmer
Business Owner
Manager
Marketer
Creating Multi-Column Text in Flash tutorial.
View 1 RepliesIs there a way to change the colour of a Dynamic Text Box so that it can have multi-color lines?
E.g.:
Nineteen says: (in red)
Hey everyone! (in black)
?
i need to split a large text file into an array at line breaks so one array element = one line.i have tried the using "" in both match() and in RegExp but it doesnt work.i had the g and m flags on. tried the $ sign too.
View 8 RepliesThe string representing the function name will be read from xml @ run time.
var combo:ComboBox = new ComboBox();
combo.labelFunction = "functionName";
So the first name, which is to be displayed in the combo box, can be only retrieved by accessing another DTO, called person and then its first name.
[Code]...
how to implement a text search in a multi-framed flash movie similar to what flash paper does. It searches all text included frames and upon hitting "enter" movies to that frame-> text occurance.
View 1 RepliesIs it possible to create a invisible mc with in 2 other invisible mc's and if so would there be any complications. Im trying to do something similar and it gets to the second layer but then doesnt want to load the third inv-mc. Like loading an external swf to a container mc then in that same mc have another external load and then another.
View 3 RepliesI have this simple script that is suppose to take a comma seperate values from xml and make it into something similar to a unordered list if only i could get a "" to work. Here is my script.
[Code]...
When the trace runs it shows me the values so i know that they are there. I am however only seeing the last value. How do i create a new line in as 3?
I 'm trying to make it so an image will scroll with a specific line of text in a text field. I know that using delta of the scrollEvent will give me direction but everytime i try to increment and decrement the y value of the image the image doesn't follow the line of text perfectly it tends to "crawl" if you will.
[Code]....
I made a scrollbar, but now I have a problem, need to read the number of lines of Dynamic text field and if it is greater than x show the scrollbar and hide if is less. Like this:
if(text.instance>7){
scrollbar._visible = true;
}
else{
scrollbar._visible = false;
}
My problem is how do I count the total lines of dynamic text field after load a external text.