I have an object that contains times to call a function. Would like to use Switch/Case to test against video stream time. Right now using a For loop every second to test against 50 times is causing super sluggishness. Hoping there is a better way that doesn’t require so much testing.
Sooo is it possible to use a Var as a Case testing numeral? Meaning…
switch(nsTime)
{
case 0 :
break;
case xmlData.slideTime1 :
updateSlide(xmlData.slidePath1);
break;
case xmlData.slideTime2 :
updateSlide(xmlData.slidePath2);
break;
// etc., etc.
}