You can return an array...
js code:
function RunReg(){
var myArray = new Array();
myArray[0] = "Blah";
myArray[1] = 404;
myArray[2] = "example";
return myArray;
}
function OtherFunction(){
var ret_val = RunReg();
Debug.Trace(ret_val[1]);
}
EDIT: Also. If you put the media message in a string:
js code:
media_string = media_string.split("\0");
for(var s in media_string){
//Do things for each section
}