Splitting Multiline Text Into Array
Hi. I want to separate a mutliline text field variable into an array so that each line is it's own string in the array. I used this code, but it doesn't work. Responses is the variable that has 5 elements separated by a return.
splitString=String.fromCharCode(13); response_array = responses.split(splitString); stop ();
I then used a dynamic text field to call the variable response_array[1] And nothing showed up. What am I doing wrong?
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-26-2001, 08:31 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Splitting Text Into An Array
In layer 1 I have the following code to pull the variable 'playerrank' from my ASP page:
myData = new LoadVars();
myData.onLoad = function() {
playerrank.text = this.playerrank;
};
myData.load("livedraftvar.asp");
stop();
In layer 2 I have the following code to split 'playerrank' into an array and enter each item into a list box:
var playerrankArray = new Array();
playerrankArray = playerrank.split(",");
for(i=0; i<8; i++) {
playerlist.addItem(playerrankArray[i]);
}
The list box comes up with 8 commas, that's it. If I put 'playerrank' into a dynamic text box, it comes up exactly how I want it. 102,204,209,308,489,518,555,698. Using playerrank.split(",") should put the eight elements into the array, then enter them into the list box. Why am I getting eight commas instead of the eight numbers. Thanks.
Splitting Text And Checking It Against An Array
Hi,
I want to get flash to read a textbox and then check the text in it against an array. But its not that simple.
I want to split up the text as follows:
The text 'Hello World' would look like this:
H, e, l, l, o, , W, o, r, l, d, He, ll, o , wo, rl, d, Hel, lo , Wor, ld, Hell, o wo, rld, Hello, Worl, ,d, Hello , World, Hello W, orld, Hello wo, rld, Hello Wor, ld, Hello Worl, d, Hello World.
I want to do this so that I can check all the combinations of the text against the array. The array is called 'badWords'. How do I check the text (in the imput textbox: 'mytext') like this?
Regards,
Splitting Text Variable Into An Array
In layer 1 I have the following code to pull the variable 'playerrank' from my ASP page:
myData = new LoadVars();
myData.onLoad = function() {
playerrank.text = this.playerrank;
};
myData.load("livedraftvar.asp");
stop();
In layer 2 I have the following code to split 'playerrank' into an array and enter each item into a list box:
var playerrankArray = new Array();
playerrankArray = playerrank.split(",");
for(i=0; i<8; i++) {
playerlist.addItem(playerrankArray[i]);
}
The list box comes up with 8 commas, that's it. If I put 'playerrank' into a dynamic text box, it comes up exactly how I want it. 102,204,209,308,489,518,555,698. Using playerrank.split(",") should put the eight elements into the array, then enter them into the list box. Why am I getting eight commas instead of the eight numbers. Thanks.
Splitting An Array
I have three arrays (see the code bellow the message), and I'm trying to get all the possible combinations of elements. The resulting array is as follows:
1a*1a%1a#1b*1b%1b#1c*1c%1c#2a*2a%2a#2b*2b%2b#2c*2c %2c#3a*3a%3a#3b*3b%3b#3c*3c%3c#
I would like to be able to split it, such that at every iteration I get the result on a new line, and the result is saved in a variable:
1a*
1a%
1a#
1b*
.
.
.
and, var1=1a* etc.
I tried using var1=field_total[0]; ,but it's not working. Any thoughts? Below is the code.
Thanx,
Smash
field1=new Array("1","2","3");
field2=new Array("a","b","c");
field3=new Array("*","%","#");
field_total=new Array();
for(i=0;i<field1.length;i++)
{
for(j=0;j<field2.length;j++)
{
for(k=0;k<field3.length;k++)
{
field_total+=field1[i].concat(field2[j],field3[k]);
//field_total+=" ";
}}}
trace(field_total);
field_total.toString();
trace(field_total);
Splitting From An Array?
Hey gang,
I'm banging my head against the wall on this one. Here's the code that I have in place at the moment:
Quote:
bottomword = tossup[tosscount].split("");
(where the tosscount is a variable counter, and the tossup[x] is an array of words.)
Everytime I run the program, I check the variable table, and it states it as "undefined".
Can someone please point out the error I'm making, or a work-around? And can someone get me an ice=pak.. my head hurts!
Thanks in advance,
MrGameShow
Splitting Array
hi
I have a large array. Please could somone suggest some code to split the array into 3 parts.
BigArray contains element1 , element2, element3, element4...
LittleArray1 should contain element1, element4...
LittleArray2 should contain element2, element5...
LittleArray3 should contain element3, element6...
Thx allp help appeciated
Splitting An Array
Hello
I have a function that causes an array
i call it with this
ActionScript Code:
var tags:Array = thisPhoto.getTagsAsStrings();
i want to split it using this but it says it cannot because it is an array
ActionScript Code:
var platStr:String = tags[1];
var platSplit:Array = platStr.split(",");
var platLast:String = platSplit[platSplit.length-0];
trace(platLast);
Splitting An Array
Hi,
does anyone know how I can split an array to get the last character of every instance name in the array?
Splitting An Array Too Slow
I am trying to split the string from a database search into an array inside flash but on slower machines I am getting a message that the flash player is not responding and asking if you should quit the script. If the user quits the script the flash file just plays through ignoring all frame scripts and continues to cycle.
I am performing two seperate split operations - the first is to split the variable into its catagories then I split the catagories information (Array) into its components i.e.
ID, Name, Suburb.
This problem only exists on slow machines when the size of the returned variable contains > 40 items.
The site in question is: www,wlmw.net
I am probably not the first to have this proble so can any body suggest a solution.
Thanks ,
Matt
Splitting String Into An Array
Hi,
this should be incredibly easy: splitting a string into an array, where each character becomes an array element.
According to Flash help files it should work like this:
Code:
myString = "hello";
myArray = myString.split("");
ie. using an empty string as delimiter in the split function.
In practice however, this simply creates an array with a single element containing the complete string - ie. the same as when doing 'myString.split()'. Am I specifying the empty string incorrectly???
(I know how to do this 'by hand' - but want to know why the split method isn't working).
Any thoughts welcome,
thx - n.
Splitting Strings Into An Array
Hi All,
I'm familiar that in flash, an array can be populated using such as a following:
var myArr = Array("cat","dog","bird");
Is there a way to populate an array if I get passed a string like this... (note the quotes placement):
"cat, dog, bird"
Some of you maybe familiar with VB's 'split' command which automatically turns that comma-delimited string into an array.
I need your help guys if there is a built-in function in flash that can do or mimic this or did I just missed an item in the help file?
Thanks in advance. Butch
Splitting An Array On Tab Character
Hello,
Quick one (hopefully):
I'm importing a text file into Flash with the format:
thinga;thingb;thingc
thingd;thinge;thingf
thinga;thingb;thingb etc.
Once I have the text in Flash I'm first using split('
') to split it into an array, and then using split(';') to convert each line into a sub-array. All works OK, but to get the text into the format thinga;thingb;thingc I'm having to convert my original Excel file to text via a very boring and slow process.
It would be a lot easier to use Excel to create a tab-separated text document, can anyone tell me how to split an array on the tab character instead of the colon as I'm doing at the moment? In other words is there a version of
for the tab key?
Ta,
Gravy.
Splitting A String To An Array
Hello there again..
I have a string "Something"
I want to separate this string to this;
arrayString[0]="S";
arrayString[1]="o";
arrayString[2]="m";
arrayString[3]="e";
arrayString[4]="t";
arrayString[5]="h";
arrayString[6]="i";
arrayString[7]="n";
arrayString[8]="g";
I tried to look for myString.split()..Did'nt work..
Can anyone help
Splitting A File Path Array?
Hi guys,
here's the deal.
I'm using flash and javascript to enable flash to call files directly from a computer's hard drive by opening the usual explorer window. When selected, Java passes the full file path to Flash and then flash does what it wants with the file.
Thing is, I'd like to display just the file names to the user instead of the complete paths.
My first thought was ARRAYS...but I can't use the backslash "" as a symbol to split the arrays.
Should I do this in Javascript first? If this is the best way, how do I do it? I'm a real beginner at Java and HTML.
Any and all help will be appreciated.
Intravenus.
Splitting Array Values Into A List Box
Hi
my problem is that i create an array consisting of external valuse. One of the array dimensions is made of xml element attributes which works dandy for all the later processing. But i am also trying to display each of the attributes on a list box for the user to see what is available.
this does work but atm says for example
wheels,steeringWheel,Brakes,Engine
instead of
Wheels
SteeringWheel
BRakes
Engine
this is the code
for (i = 0; i < myXML.childNodes.length; i++)
{
this[myXML.childNodes[i].nodeName] = new Object();
this[myXML.childNodes[i].nodeName].name = myXML.childNodes[i].nodeName;
this[myXML.childNodes[i].nodeName].isa = myXML.childNodes[i].attributes.isa;
this[myXML.childNodes[i].nodeName].has = myXML.childNodes[i].attributes.has.split(",");
parseArray.push(this[myXML.childNodes[i].nodeName]);
hasDisplay.addItem(myXML.childNodes[i].attributes.has.split(","));
} // end of for
where hasDisplay is the list box I dont really want to change the structure of the array because that is used later on and works fine just wondered if anyone knows how i could split the attribute values when it reaches a comma?
thanks.
Splitting An Array Into Multiple Variables
i know how to use arrays in a flash file but i'm not sure if i can split it into multiple from an input text box:
Code:
stop();
getcode = [_root.colorskin, _root.coloreyes, _root.colorwing, _root.eyes, _root.mouth];
function post() {
dragonarray = [postcode.text];
_root.thing = dragonarray.length;
trace(_root.thing);
}
when it traces the code it says 1
:/
is it possible to split the input box text up like an array?
and split the array up into multiple variables like this:
input box text: 26112,39423,13998489,3,3
_root.variable1= 26112
_root.variable2= 39423
etc
etc..
can somebody help please?
Splitting A String Into An Array Of Three Words?
Hi kids,
heres one - how would I go about splitting a string into an array of substrings based on every third space?
Basically, each element of the array will contain three words, or less for the last one.
Multiline Array
I have created a group of buttons used in turn to create an array. It works fine, but what I can't figure out how to do is to get the items of the array to print on individual lines like:
Milk
Butter
Bread
rather than on one line separated by commas like:
Milk,Butter,Bread
How do I do this?
Also, is there a way to specify line spacing between each item once they've been placed on individual lines?
Here is the code that I have so far ...
var shopList:Array=new Array();
var i:Number=-1;
milk_btn.onRelease=function() {
++i;
shopList[i]="Milk";
}
butter_btn.onRelease=function() {
++i;
shopList[i]="Butter";
}
bread_btn.onRelease=function() {
++i;
shopList[i]="Bread";
}
enter_btn.onRelease=function() {
items_txt.text=shopList;
}
Thanks!
Simple Splitting Values From A Txt File Into An Array Question...
I've got a simple txt file:
friends=tom9dick9harry9bob
and using this code to load that and split it into an array:
code:
myVar=new LoadVars(this);
myVar.load("friends.txt");
myVar.onLoad = function(success){
if(success){
myArray = new Array(this)
myArray = myVar.friends.split("9");
}
}now that works fine but I'd like to make the txt file a little easier on the eye so it looks like this:
friends=tom
dick
harry
bob
but now I'm stumped, what do you replace the "9" with in the split function, do you need some funky ascii code or something for a new line/carriage return?
sure this is simple to do for someone who knows.
Splitting External Vars To Be Loaded Into An Array Of Objects
This part loads the vars that I have in my getLinks.txt file.
ActionScript Code:
TempLinkLoadVars = new LoadVars();TempLinkLoadVars.load("getLinks.txt");TempLinkLoadVars.onLoad = function() { gLinksArray = this.tempLinks.split("|"); trace(gLinksArray);};
it works very nicely, but i want to combine both of the sections of code to load my vars into an object that is located in an array.
----
this actionscript has objects declared and defined and applied to my allLinks array so I can manipulate them.
ActionScript Code:
function Link(linkTitle, linkUrl, linkCategory, linkDescription) { this.linkTitle = linkTitle; this.linkUrl = linkUrl; this.linkCategory = linkCategory; this.linkDescription = linkDescription;}allLinks = [];allLinks.push(new Link("Google", "http://www.google.com", "Search", "Great Search Engine"));allLinks.push(new Link("Yahoo", "http://www.yahoo.com", "Portal", "Advertisement Central"));allLinks.push(new Link("Ask Jeeves", "http://www.aj.com", "Search", "Decent Search Engine"));allLinks.push(new Link("Boundless-Vision", "http://www.boundless-vision.com", "Personal", "My personal website"));allLinks.push(new Link("Kirupa", "http://www.kirupa.com", "Tutorial", "Great Tutorial Site"));trace("Original data:");for (i=0; i<allLinks.length; i++) { trace(i+" "+allLinks[i].linkTitle+" "+allLinks[i].linkUrl+" "+allLinks[i].linkCategory+" "+allLinks[i].linkDescription);}allLinks.sortOn("linkUrl");trace("
After sort on linkUrl:");for (i=0; i<allLinks.length; i++) { trace(i+" "+allLinks[i].linkTitle+" "+allLinks[i].linkUrl+" "+allLinks[i].linkCategory+" "+allLinks[i].linkDescription);}
----
Example of what I would like to accomplish ...
where "&" denotes the beginning and end of file.
where "|" denotes paramaters of each object.
where "," denotes the next object of the array eg, link2.
VARS.txt - &link1=link1_title|link1_url|link1_category|link1_ description,link2=link2_title|link2_url|etc....&
or something very similar.
Not quite sure if those are the best var 'splitters' or not.
I have not been able to pin this script down... it's just out of my reach..
Might be having a bad day....
Thanks For the help!
Splitting External Vars To Be Loaded Into An Array Of Objects
This part loads the vars that I have in my getLinks.txt file.
ActionScript Code:
TempLinkLoadVars = new LoadVars();TempLinkLoadVars.load("getLinks.txt");TempLinkLoadVars.onLoad = function() { gLinksArray = this.tempLinks.split("|"); trace(gLinksArray);};
it works very nicely, but i want to combine both of the sections of code to load my vars into an object that is located in an array.
----
this actionscript has objects declared and defined and applied to my allLinks array so I can manipulate them.
ActionScript Code:
function Link(linkTitle, linkUrl, linkCategory, linkDescription) { this.linkTitle = linkTitle; this.linkUrl = linkUrl; this.linkCategory = linkCategory; this.linkDescription = linkDescription;}allLinks = [];allLinks.push(new Link("Google", "http://www.google.com", "Search", "Great Search Engine"));allLinks.push(new Link("Yahoo", "http://www.yahoo.com", "Portal", "Advertisement Central"));allLinks.push(new Link("Ask Jeeves", "http://www.aj.com", "Search", "Decent Search Engine"));allLinks.push(new Link("Boundless-Vision", "http://www.boundless-vision.com", "Personal", "My personal website"));allLinks.push(new Link("Kirupa", "http://www.kirupa.com", "Tutorial", "Great Tutorial Site"));trace("Original data:");for (i=0; i<allLinks.length; i++) { trace(i+" "+allLinks[i].linkTitle+" "+allLinks[i].linkUrl+" "+allLinks[i].linkCategory+" "+allLinks[i].linkDescription);}allLinks.sortOn("linkUrl");trace("
After sort on linkUrl:");for (i=0; i<allLinks.length; i++) { trace(i+" "+allLinks[i].linkTitle+" "+allLinks[i].linkUrl+" "+allLinks[i].linkCategory+" "+allLinks[i].linkDescription);}
----
Example of what I would like to accomplish ...
where "&" denotes the beginning and end of file.
where "|" denotes paramaters of each object.
where "," denotes the next object of the array eg, link2.
VARS.txt - &link1=link1_title|link1_url|link1_category|link1_ description,link2=link2_title|link2_url|etc....&
or something very similar.
Not quite sure if those are the best var 'splitters' or not.
I have not been able to pin this script down... it's just out of my reach..
Might be having a bad day....
Thanks For the help!
Splitting Text
How can I split the text I have in an inut textbox into separate letters and check this against an array.
eg. 'Hello world', would come out as, h,e,l,l,o, ,w,o,r,l,d. and each of these separate things would be checked against an array.
I can do the rest, so just please give me some kind of if statment or somthing to put my code in if one of the letters equals somthing in the array.
Regards,
Splitting Text
How do I split text into individual letters and add these letters to an array?
Thanks for any help,
Splitting Up Text
This AS2 script splits ups an input textfield value into individual letters. So if the user types in "CAT" this script will split the word into individual letter varables. eg: "C" "A" "T".
Can someone help me out with this script so that it works in AS1
This is the code on a button.
on(Release){
for(x=0;x < myText.length;x++){
var word:String = myText.text;
_root["myLetter"+x] = word.charAt(x);
}
}
myText is the instance of the input textfield
I called the variables (for individual letters) : root.myLetter0, _root.myLetter1, _root.myLetter2 and so on
Splitting Text
I'm trying to split text in a much more efficient way then I am currently doing. I load external text from a db through php. My display page offers a thumbnail embedded in the layout so I'm using 2 text boxes. textnews_details_1 & textnews_details_2.
My code seperates the content after 400 characters right now and looks for a new word so it doesn't cut just at the characters. I've been learning on these boards that I can count exactly where the text ends based on the number of lines and then put the rest of the text in my second text box. I've messed around for a few days and am more confused now then when I started. I know that my first text box holds ten lines and then me second is set to autosize and my scrollbar wil kick in if needed. I'd love to more efficiently separate the text.
Any help would be great!!
Here is my current code.
PHP Code:
// loads the image into place
news_img.loadMovie(_level10.details_img);
// number of characters to split the text
fill = 400;
if (_level10.details_desc.length>400) {
news_details_1 = _level10.details_desc.substring(0, Number(_level10.details_desc.lastIndexOf(" ", fill)));
news_details_2 = _level10.details_desc.substring(Number(_level10.details_desc.lastIndexOf(" ", fill)+1));
} else {
news_details_1 = _level10.details_desc;
}
textnews_details_2.autoSize = true;
textnews_details_2.wordWrap = true;
Splitting From A Text File
Hey I have a text file with a variable in it ... and it contains
THIS : List1, List2, List3
So I make a call in flash to retrive that variable from the Text file ... I can do that fine ... but what I want to know is how can I split this string up and place each word in a different variable ... example:
Var1 = List1
Var2 = List2
Var3 = List3
and it has to work on the bases of (you don't know how many words there will be w/ commas) ... it could be 5 words - it could 55 words ... you don't know ... can this be done
- Steven
Splitting Dynamic Text
I have a project, and basically what i need to do is get a user to enter there name in a text field. Then they click a button. After this is done I want to split the Individual characters up and have them move along a line. It is to demonstrate a network.
Is it possible to do this ? If so how!
Splitting A LARGE Text Field?
Hello,
I recently started a project that requires me to deal with data from 50 LARGE excel spreadsheets. By large, I mean that each of them is 500+ rows long and 12-15 columns wide.
What I have done, to make the data manageable and useful for my needs, is to create a script that splits the excel spreadsheet (after being exported as a text file with tab delimiters) into rows and columns, and then puts them into a flat file. This works great except that it cannot handle the HUGE spreadsheet files. I keep getting that popup window that says that a script in my movie is causing it to run slow, I need to abort...
So, here is my question: Is it possible to split this large text file exatly on every 20th line break?
Since it is not hard to import the text file, just to work with the entire thing, my plan is this: I want to import it, break it into workable chunks, process the chunks one-by-one, then put them all back together and export it as a new text file. I would like the user to just input the name of the original file and then the script does everything else.
Thanks for any help or suggestions.
[CS3] Splitting Lines From Input Text
Hi-
I'm fairly new to Actionscript so forgive me if answering this question is absurdly easy or difficult. I'm using an input text field (multiline, no wrap) to gather input and I need a way to split the text from this into array indices where every new line begins so a script can do something with each line individually. Is this possible? Should I be using the chr() function to find new lines? Or can this be accomplished with the textArea component? Thanks in advance for any help!
Splitting Text Into Individual Words
Can anybody help?
I am trying to work out out how to split a variable that contains text into a individual words that can then be displayed in seperate text boxes. I working on the assumuption that the text will be split into an array but I cant figure out how to break it up into words.
The basic idea is for a user to input text (about one sentence) then this text will be animated as individual words to make up the sentence.
Any ideas, suggestions etc would be gratefully recieved.
Hutch
Splitting Text Into Separate Arrays?
hey, i am trying to split some data from a database that is being pulled by php into separate arrays. I can bring all the information into a single array and trace its position in that array but i need to have the information split depending on the the php output.
for example:
&gallerytitle=imageone|imagetwo|imagethree|&galler yimages=img1.jpg|img2.jpg|img3.jpg
i need the gallerytitle to be one array and the galleryimages to be another array
any help would be amazing, thanks!
code
ActionScript Code:
import flash.events.Event;
import flash.net.*;
var myRequest:URLRequest = new URLRequest("http://localhost/media_gallery/loadinfo.php");
var myLoader:URLLoader = new URLLoader();
var myVariables:URLVariables = new URLVariables();
myRequest.method = URLRequestMethod.GET;
myRequest.data = myVariables;
function onLoaded(evt:Event):void {
var namearray:Array = new Array();
var valuestring:String = myLoader.data;
trace(valuestring);
namearray = valuestring.split("|");
trace("here we get the data back: "+namearray[15]);
}
myLoader.addEventListener(Event.COMPLETE, onLoaded);
myLoader.load(myRequest);
Splitting Text Across Multiple Textfields
Hey!
Working with textfields in AS3 and have some musings. I´ve two textfields where I splitting a text across.
ActionScript Code:
myText1_txt.type = "input";myText1_txt.htmlText = "Looong text goes here...";myText2_txt.type = "input";myText2_txt.htmlText = myText1_txt.htmlText;for (var i:int = 0; i < myText1_txt.bottomScrollV; i++){ myText2_txt.htmlText += "<br>";} myText2_txt.scrollV = myText1_txt.bottomScrollV + 1;
This works fine. It counts the lines in the left textfield (visible lines) and then scrolls the right field. Now I want to add input functionality so that you can type into myText1_txt textfield (left field) and it will automatically flow over to myText2_txt - the right textfield. Any suggestions?!
Dynamic Text From MySQL Problem. Multiline + HTML-rendered Text Wanted...
Hi.
I'm in the process of writing a guestbook using Flash, PHP and a MySQL database. A large part of the Flash-code, is fully functional, but there is one strange problem.
The text i'm echo'ing from the PHP document into Flash, doesnt wrap correctly in my textfield. I've set the textfield to multiline and I've pressed the "Render as HTML"-tab. But the text is displayed with HTML-tags and stays on one line.
This is how it looks: http://www.riminalitet.org/guestbook.swf The buttons below the field are "Next"- and "Back"-buttons for the submissions...(It's danish )
I've experienced that it works if I use
instead of <br> in my HTML-formatted code. But I'd like to use <b>BOLD</b> as well. And if I urlencode my output-code from PHP, nothing changes. Still one line with HTML-tags...
The textfield is embedded in a scrollPane. I'm targeting this field in my LoadVars function. Can this has something to do with the problem?
Should I use the ScrollBar component in stead of the scrollPane to retrieve dynamic text? (This would be a little bugging, since my goal is to display the text nicely with some graphics around it).
Hope some of you guys can help me with this. Bye now...
Loading Text Files Into Multiline Input Text Boxes
Can someone tell me if it is possible to load text files (.asp, .txt, .css, .js) into a multiline input text box in FlashMX?
I have a text box called "textArea" that I want to use as the text editor for any text file on the server.
myTextStream = "somefile.xxx";
textArea.text = myTextStream;
Clickable Text Inside Multiline Text Field
Hi there,
I have a movie with a dynamic multiline text field, and want each line of the text to be clickable. The text is put into the text field from a script, and I am using HTML formatting to make the text clickable, as in
mytextfield = "<a href="http://www.domain.com"> + string + "</a>";
However, I don't actually want my clickable text to go to URLs, I want it to run some ActionScript, but I can't figure out if it is possible. Basically what I want to do is something like this
mytextfield = "<a href="_root.gotoAndPlay(4)"> + string + "</a>";
Maybe I'm going about it the wrong way, but I can't find any advice on how to make clickable text in a text field which triggers an ActionScript command.
Hope you can help - Sam
[MX04] Dynamic Text Not Wrapping On Multiline Text Box
Have multiline textbox with dynamic text loaded from URL variables.
I am assuming that the title, let's say:
It%27s+about+time+somebody+did+something+about+it+ It%27s+about+time
is being decoded into flash. I turn it into a var, and try to have it wrap in text box.
No beuno, just one single line with the entire sentence.
Why so?
Thanks
Ryan
Width Of Text On The Last Line Of Multiline Text Field
I think this has been solved here:
http://www.actionscript.org/forums/s...d.php3?t=90797
However, when I paste that into Flash I get an error that says: "Attribute used outside class". Can anyone help me figure out why that's happening.. or offer a better solution for what I need to accomplish.
Ultimately, I'm trying to place a Quote MovieClip to the end of the last character in the last line of a dynamic text field.
Thanks.
Multiline Text
I would like to create text via actionScript, but if the text has more than one line, and I can't do it...
If I use the textTool to create text (an empty box) and name it myText, and choose multiline in the property inspector, I can do it...:
_root.myText.text = "how to create multiline text?"
works just fine...
but if I do this:
_root.createTextField("myText", xPos, yPos, w, h);
_root.myText.text = "how to create multiline text?"
_root.myText.multiline = true;
it doesn't work...
what am I doing wrong?
Multiline In Text Box?
hi guys!
i have a dynamic text box called "myTextBox"
in my button i have this:
_root.myTextBox.text = "this is a line";
what im wanting to be able to put new lines in like when you press enter when writing text.
so the result would be somthing like this:
-----------
this is line 1
this is line 2
this is line 4
etc
------------
how do i go about this?
thanks
Flash Irritating Me: Splitting Text Loaded From Textfile Won't Work.
ActionScript:
onClipEvent (load) {
_root.item=new array();
_root.item = _root.vartext.varprice.split("|");
trace (_root.item.length);
}
2 text files - loaded into 2 text fields - varprice & varitem [inst_varprice] & [inst_varitem]
the 2 text fields in a movieclip - vartext [inst_vartext]
the text file is similar to this:
varprice=onion|orange|apple|melon
Output:
undefined
[]-indicates instance names
End Of The Line In The Multiline Text
Hi!
how can I find the end of the line in the multiline dynamic text field??
I need the index of the first character at the last line..
thanx in advance
Multiline Input Text
I want to create an input box with multiline property and when I press "Enter" key in the input box, the cursor will go to next line even though the cursor has not reached the end of the box width. Therefore the user can input any text and wrap at any point.
Multiline Text For Checkbox
Is there a way to create multiline text labels for the Checkbox Component.
I am creating a multi choice quiz using the MM multi choice components but have a number of questions which are rather verbose and will not fit on one line. How do I extend the text label to multiline?
Regards,
Matt
Multiline Dynamic Text?
ok lets say i have a movie that is ONLY a multiline dynamic text field, but i want the field to have as small of a height as possible while still fitting all the text that is sent to it. so basically, if it is sent enough characters to have 9 lines of text, i want the field and the movie to adjust to that height. is this possible?
Multiline Input Text
Hello everyone,
just curious if there is a way to "reset" a multiline input text field.
I know how to clear it after submit, but how do I make the default position at the top after submission?
Thanks in advance
-Adam
Dynamic Text W/ Multiline?
I'm having a dynamic text variable, named "text", but i couldn't make it to printed some text in multilines.
E.g: text=string("I haven't seen any one..
..in many years. ");
--> It didnt work.
> At "
" (I mean without quotes ^^) I wanted to break that line to 2 lines. How can I do?
Thanks
Multiline Text - Where's Last Line?
I have a dynamic multiline text box, that I'm applying an autoSize = "center" on. Tracing the height of the box, I see that the autosize is working, although it's not showing the last line of text for some reason.
http://www.tetdesign.com/misc/multiline/
Here's the script, and you can download the .fla here to dig in if you'd like :
this.playTitle1 = "Josh Childress Flys High";
this.playTitle2 = "Lebron James Jams Over the Lakers";
this.playTitle3 = "Kyle Korver Hits From the Outside";
//place copy for plays
function placeCopy():Void {
for (var i = 1; i<4; i++) {
//drop title
this["videoGrab"+i].playTitle.text = this["playTitle"+i];
this["videoGrab"+i].playTitle.multiline = true;
this["videoGrab"+i].playTitle.wordWrap = true;
this["videoGrab"+i].playTitle.autoSize = "center";
trace(this["videoGrab"+i].playTitle._height);
}
}
Dynamic Text Multiline?
I have an email script, when email is submitted variables are sent to php as well as a dynamic text box displaying the informatoin that was sent. My issue is that the message variable is not multi lining in the dynamic text field even though the field is set up for multi line, any idea why?
Multiline In UI Input Text Box
Can u apply the multiline wrap to UI input text box? basically I want you to be able to type in it,but I made the input box long, when published though the text just goes on one continuous line as opposed to going to the next line when its about to run outta space in the box..you know what I mean?
|