Possible Duplicate:
What is the best way to get the minimum or maximum value from an Array of numbers?
Hi - I'm trying to use flash's Math.max() functionality to find the highest of a set of numbers. Normally, these are input via a comma delimited string of numbers, but I need to have it loop through a series of numbers in an array. What is the proper syntax for this? I tried:
var maxMemberWidth = int(Math.max(
for (var k=0;k<memberClips.length;k++){
memberClips[i].memeberWidth;
}
));
but that's obviously not right. I have a feeling the answer involves running some sort of separate function and returning the values to this function, but I haven't quite gotten the syntax right yet.