package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var animalName:String = "dove";
switch (animalName) {
case "turtle":
case "iguana":
trace("Yay! You named a reptile.");
break;
case "dove":
case "cardinal":
trace("Sorry, you specified a bird, not a reptile.");
break;
default:
trace("Sorry, try again.");
}
}
}
}
|