Johan,
 (I'm assuming you're talking about AS2?)

Not directly. What you can do is use the initObject parameter of attachMovie.

If you have a class:

class MyClip extends MovieClip
{
 public var someInitParam:String;
 public var someOtherInitParam:Number;

 public function MyClip()
 {
    trace(someInitParam);
    trace(someOtherInitParam);
 }
}

and have it linked to the symbol MySymbol then call:

myTimeLine.attachMovie("MySymbol","myinstance", {someInitParam:"Test",
someOtherInitParam:73});

then when the MyClip constructor runs, those properties will be set
and you'll see that appropriate trace.

initObject is exactly that - a workaround for the face that
MovieClip-derived classes can't have their constructors explicitly
called.

Hope that helps!

 Ian


On 3/30/07, Johan Nyberg <[EMAIL PROTECTED]> wrote:
Is it possible to send parameters to the constructor of a class that
extends MovieClip, i.e. when the movie clip that is linked to that class
is loaded?

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to