Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : String manipulation


Scott Filloon
4/22/2004 8:59:17 PM
Hi,

I need to be able to insert charicters into a certain position within a
string using actionscript. Does anyone know what method to use in order to
do this? For example, lets say there is a text field with a value of
"HelloWorld" and I want to insert a space between the two words. I'm using
Flash MX.

I've looked all through my Flash books and can't seem to find a way to do
this.

Thanks for any help,

Scott

mandingo
4/23/2004 2:33:39 AM
What about something like this to get you started:

thisString = "HelloWorld";
thisTest = thisString.split("");
trace(thisTest)
thisTest.splice(5,0," ");
thisString = thisTest.join("");
trace(thisString);


hope that helps
cheers,
AddThis Social Bookmark Button