I have a textfield, that has a text value: France Paris. Now I need to know how I can take that string, cut it in 2 parts (France and Paris) and put those two parts in a var. So:
<textfield id="field1" text="France Paris">
and somewhere i should get
var1 = France;
var2 = Paris;
I know there is a split string command, but i'm not familiar with any of this stuff.
Thanks for you help!
first place to try is the ActionScript document library - google also works well
in meantime something like this will likely work
var strArray:Array = field1.text.split(' '); var var1:String = strArray(0); var var2:String = strArray(1);
Thanks, this helped.