From: kramm Date: Tue, 30 Dec 2008 22:38:36 +0000 (+0000) Subject: test calling methods on other classes, too X-Git-Tag: release-0-9-0~598 X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;h=2d417c10037b21df554449d053cb8c9a3628d207;hp=de83e7fb13a4815cea25becfd74c257da2ec79a0;p=swftools.git test calling methods on other classes, too --- diff --git a/lib/as3/ok/boundmethod.as b/lib/as3/ok/boundmethod.as index 885e5b3..ecf77ec 100644 --- a/lib/as3/ok/boundmethod.as +++ b/lib/as3/ok/boundmethod.as @@ -1,5 +1,14 @@ package { import flash.display.MovieClip; + + public class Other { + var a="ok 3/3"; + + function print2() { + trace(this.a); + } + } + public class Main extends flash.display.MovieClip { internal var r; function print(s) { @@ -8,8 +17,11 @@ package { } function Main() { var x = this.print; - this.r = "ok 2/2"; - x("ok 1/2"); + this.r = "ok 2/3"; + x("ok 1/3"); + + x = (new Other).print2; + x(); } } }