code:
string1="one,two,three,four,five,six,seven,hi there"
myarray=root.split(string1,",")
trace("array length="+myarray.length)
for (x=0;x<myarray.length;x++){
trace(myarray[x])
}
code:
function split(BL_string,delimiter){
BL_array=new Array()
/* Function to replace missing split functionality
call it myArray=root.split(string,delimiter)
*/
//Get first element in array
first=BL_string.indexOf(delimiter,0);
end=BL_string.indexOf(delimiter,first+1);
BL_array[0]=BL_string.substr(0,first);
//Now get the rest of the elements
start=first
idx=1
while(start<>-1){
end=BL_string.indexOf(delimiter,start+1);
if (end==-1){
BL_array[idx]=BL_string.slice(start+1,BL_string.length);
}else{
BL_array[idx]=BL_string.substr(start+1,(end-start-1));
}
idx++
start=BL_string.indexOf(delimiter,start+1);
}
return BL_array
}//end if split function