Evaluating Switch?
Just ran across what seems like an odd one, and a cursory Googling didn't get me an answer. Though I'd think I must've run across this before, I couldn't remember...
So why can I evaluate an expression in a switch like so:
switch(vidList[currentIndex].video){
case "city":
vid = "assets/smart_city.f4v";
break;
...
}
If I trace vidList[currentIndex].video before the switch I get "city" but tracing vid after the switch I get null
Quickly solved by just assigning to a variable and then using that in the switch... but it still seems odd I can't just do it directly.
var scene:String = vidList[currentIndex].video;
switch(scene){
...