From 04987d2fb9bdc8f1e4437924582ac33a20d5f5b9 Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 30 Dec 2008 22:43:49 +0000 Subject: [PATCH] test function member assignment --- lib/as3/ok/funcassign.as | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lib/as3/ok/funcassign.as diff --git a/lib/as3/ok/funcassign.as b/lib/as3/ok/funcassign.as new file mode 100644 index 0000000..805b5cb --- /dev/null +++ b/lib/as3/ok/funcassign.as @@ -0,0 +1,30 @@ +package { + import flash.display.MovieClip; + public class Main extends flash.display.MovieClip { + + function ok1() { + trace("ok 1/3"); + } + function ok2(a:uint) { + if(a==2) + trace("ok 2/3"); + } + function ok3():Boolean { + trace("ok 3/3"); + return true; + } + + var a; + var b:Function; + var c; + + function Main() { + this.a = ok1; + this.a(); + this.b = ok2; + this.b(2); + this.c = ok3; + if(!this.c()) trace("error"); + } + } +} -- 1.7.10.4