macromedia flash actionscript scripting, php, remoting, webservices, c#, javascript
...for calling the init-method automagicly(implicit) under usage of the init-object.
I found this trick in the german flashforum where Florian Krüsch, a great and creative developer, postet this trick.
The idea is very simple:
class ExtendedMc extends MovieClip
{
public function ExtendedMc()
{
}
private function init(a,b,c:String):Void
{
trace([a,b,c]);
}
public function set initParams(initValArr:Array):Void {
init.apply(this,initValArr);
}
}
// FLA:
_root.attachMovie("ExtendedMc", "m", 100, {initParams:["Horst","Peter","Gustav"]});
Posted by hOk at January 27, 2004 09:55 AM
Comments (3)
you´re welcome :D
Posted by Florian Krüsch at January 28, 2004 10:46 AM
:D
Posted by hOk at January 28, 2004 11:01 AM
A really cool tuff idea Mister Krüsch. Thank´s hOk for the details .
Posted by mabo at January 29, 2004 01:31 PM
|
You can use <code>code that should be highlightned</code> to highlight code! Optionally you can use the attribut language="php|perl|java" within the code tag, otherwise actionscript-highlightning will be used. |
