Callable objects on ActionScript?
Posted
by CodexDraco
on Stack Overflow
See other posts from Stack Overflow
or by CodexDraco
Published on 2010-04-28T17:21:51Z
Indexed on
2010/04/28
17:47 UTC
Read the original article
Hit count: 187
actionscript-3
|flex
Hi, is it posible to have callable objects on ActionScript? For example:
class Foo extends EventDispatcher
{
Foo() { super(); }
call(world:String):String
{
return "Hello, " + world;
}
}
And later...
var foo:Foo = new Foo();
trace( foo("World!") ); // Will NOT work
© Stack Overflow or respective owner