added assert() in cut_last_push
[swftools.git] / lib / as3 / ok / switch.as
1 package {
2     import flash.display.MovieClip;
3     public class Main extends flash.display.MovieClip {
4         function Main() {
5             var x:int;
6             for(x=0;x<5;x++) {
7                 switch(String(x*x)) {
8                     case "0": trace("ok 1/5");break;
9                     case "1": trace("ok 2/5");break;
10                     case "2": trace("error");break;
11                     case "3": trace("error");break;
12                     case "4": trace("ok 3/5");break;
13                     case "9": //fallthrough
14                     case "10":
15                     trace("ok 4/5");break;
16                     default:
17                     trace("ok 5/5");break;
18                 }
19             }
20
21             switch(1) {
22                 case 2: trace("error");break;
23             }
24             
25             switch(1) {
26                 case 10:
27             }
28             
29             switch(1) {
30                 case 1: late1 = false; break;
31             }
32         }
33         var late1:Boolean;
34     }
35 }