actionscript - AS3 default values as Class in Function Parameter -
how can assign default value function parameter of type class in action script 3
public function foo(param:class = ????? ) { }
thanks
you can't, here's workaround achieve same effect:
public function foo(param:class = null ):void { if(!param) { // this'll default class param = myclass; } // here can do: var bar:* = new param(); }
Comments
Post a Comment