actionscript 3 - I wanna understand why this syntax works, and how -
i've seen strange thing know works, can't seem understand why , how works.
i have line of code reads this:
_game._requestedstate = new (flxu.getclass(flxu.getclassname(_game._state,false)))(); ok, can see here, is, i'm invoking annonymous constructor, reflection. it?
- a simple yes answer.
- a no explanation how , why works perfect.
thanks.
there's no such thing anonymous constructor.
the method called flxu.getclassname, makes clear there in fact name involved. takes _game._state, get's class name , gets actual class name.
this similar getdefinitionbyname(), uses internally.
Comments
Post a Comment