made segment direction fill-sensitive
[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/6");break;
10                     case "1": 
11                         try {
12                             trace("ok 2/6");
13                             throw new Error();
14                         } catch(e:Error) {
15                             trace("ok 3/6");
16                         }
17                     case "2": 
18                         trace("ok 4/6");
19                         break;
20                     case "4": 
21                         trace("ok 5/6");
22                     case "fallthrough": 
23                         trace("ok 6/6");
24                 }
25             }
26             trace("[exit]");
27         }
28     }
29 }