bugfixes
[swftools.git] / lib / as3 / ok / switchtrycatch.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<3;x++) {
7                 switch(String(x*x)) {
8                     case "0": 
9                         trace("ok 1/5");break;
10                     case "1": 
11                         try {
12                             trace("ok 2/5");
13                             throw new Error();
14                         } catch(e:Error) {
15                             trace("ok 3/5");
16                         }
17                     case "4": 
18                         trace("ok 4/5");
19                     case "fallthrough": 
20                         trace("ok 5/5");
21                 }
22             }
23         }
24     }
25 }