Making a messenger design pattern in as3 should not be too hard:
Seeing that this is possible:
function doStuff():void
{
trace("doStuff called");
}
var obj:Object = new Object();
obj["x"] = 100;
trace(obj.x);
obj["f"] = doStuff;
obj.f();
obj["f"]();
var fString:String = "f";
obj[fString]();
//output:
//100
//doStuff called
//doStuff called
//doStuff called
No comments:
Post a Comment