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
Showing posts with label Design Patterns. Show all posts
Showing posts with label Design Patterns. Show all posts
Wednesday, September 5, 2012
Messenger and Interpreter Pattern AS3
Subscribe to:
Posts (Atom)