X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fok%2Fboundmethod.as;h=0a18e7e0c8e710914dce0d0ac5fb080745e49e96;hb=d9ef7c0f7757575fb40ba2a59b5cac201a5c27fc;hp=885e5b3b7c2a63a6d3e7d3306c69dcf65c70d312;hpb=50fd04a2bb9b2a8f374ea99446f6631606704c6c;p=swftools.git diff --git a/lib/as3/ok/boundmethod.as b/lib/as3/ok/boundmethod.as index 885e5b3..0a18e7e 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,13 @@ 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(); + + trace("[exit]"); } } }