From: Matthias Kramm Date: Wed, 11 Feb 2009 15:04:11 +0000 (+0100) Subject: added test for class-level anonymous functions X-Git-Tag: release-0-9-0~115 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=ea0e53cbe74fa80f5add15711e484f075396560c;p=swftools.git added test for class-level anonymous functions --- diff --git a/lib/as3/ok/anonymous_functions.as b/lib/as3/ok/anonymous_functions.as index 6b05500..3ae87c7 100644 --- a/lib/as3/ok/anonymous_functions.as +++ b/lib/as3/ok/anonymous_functions.as @@ -2,6 +2,8 @@ package { import flash.display.MovieClip import flash.geom.Point + public var func:Function = function(nr:uint) {trace("ok "+nr+"/4");} + public class Main extends flash.display.MovieClip { function run(f:Function, text:String) { @@ -12,11 +14,13 @@ package { var log = function(text) { trace(text); } - log("ok 1/3"); + log("ok 1/4"); var l = log; - l("ok 2/3"); + l("ok 2/4"); + + run(function(text) {trace(text)}, "ok 3/4") - run(function(text) {trace(text)}, "ok 3/3") + func(4); trace("[exit]"); }