small fix for previous commit
[swftools.git] / lib / as3 / ok / nested_functions.as
1 package {
2     import flash.display.MovieClip
3     import flash.geom.Point
4
5     public class Main extends flash.display.MovieClip {
6         static public var ok:String = "ok";
7
8         function test(x,y) 
9         {
10             trace("ok 1/5")
11             x = msg(2, 5)
12             y = msg(3, 5)
13             trace(x);
14             trace(y);
15
16             function msg(nr,total):String {
17                 return ""+this.Main.ok+" "+nr+"/"+total
18             }
19
20             var x1 = "err";
21             var x2 = "err";
22             
23             function setok() {
24                 x1 = "ok 4/5";
25                 x2 = "ok 5/5";
26             }
27             var s = setok;
28             s();
29             trace(x1);
30             trace(x2);
31
32             trace("[exit]");
33         }
34
35         public function Main() {
36             test(3,4);
37         }
38     }
39 }