macromedia flash actionscript scripting, php, remoting, webservices, c#, javascript
Long time no updates here and also no time to programm
with flash.
I just stumbled over the following fact:
If you register a class for a movieclip, the constructor is
always called bevor our mc is on the stage. Additionally
the constructor is called without arguments. So if we want
to parameterize our mc we have to use an init-method.
So i have decided that i now use an init-method by
convention, because i don't want to keep in mind which
object needs to and which not.
This makes it easy to attach movies programmaticly and
also in design-enviroment. In design-enviroment we could
use the onClipEvent(load) for calling the init method.
So our clips behave like components without the overhead
of them. And it is still easy to make components out of them,
by putting some additional code to the constructor.
Another point is that i have decided to use named parameter,
for selfcommenting of the params. So instead calling init(4, 0.8)
we can call init({speed:4, friction:0.8}).
Posted by hOk at October 17, 2003 12:44 PM
