Hey all,
Is there a more efficient way to write this? Probably with a for loop, but I can’t seem to get it right.
[AS]
var stripLine:Array = newStr[0].split("_");
if(stripLine.length > 3) {
description.text = stripLine[1]+" “+stripLine[2];
} else if(stripLine.length >4) {
description.text = stripLine[1]+” “+stripLine[2]+” “+stripLine[3];
} else if(stripLine.length >5) {
description.text = stripLine[1]+” “+stripLine[2]+” “+stripLine[3]+” “+stripLine[4];
} else if(stripLine.length >6 {
description.text = stripLine[1]+” “+stripLine[2]+” “+stripLine[3]+” “+stripLine[4]+” “+stripLine[5];
} else {
description.text = stripLine[1]+” "+stripLine[2];
}
[/AS]
Thanks!
Igby