git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug in links spec
[swftools.git]
/
lib
/
as3
/
ok
/
anonymous_functions.as
diff --git
a/lib/as3/ok/anonymous_functions.as
b/lib/as3/ok/anonymous_functions.as
index
6b05500
..
3ae87c7
100644
(file)
--- 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
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) {
public class Main extends flash.display.MovieClip {
function run(f:Function, text:String) {
@@
-12,11
+14,13
@@
package {
var log = function(text) {
trace(text);
}
var log = function(text) {
trace(text);
}
- log("ok 1/3");
+ log("ok 1/4");
var l = log;
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]");
}
trace("[exit]");
}