Also, leave the "Parameters" in the "Component Definition" window blank, it's 
there for backwards compatibility and will be filled 
in automatically if you use [Inspectable] metadata in your class.
But for that to work you need to fill in the class (including package) in the 
"AS 2.0 Class" field - just below the paramaters in 
the Component Definition window.

When you make changes to a class' [Inspectable] metadata, those changes are not 
reflected in the fla immediatly. For instance, if 
you add new Inspectable metadata and you have a movieclip instance on stage, 
you won't see the properties show up in the Parameters. 
You'll have to compile the fla first, or make the movieclip a "compiled clip" 
and recompile it each time you change the class.

regards,
Muzak

----- Original Message ----- 
From: "T. Michael Keesey" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Saturday, February 17, 2007 9:08 AM
Subject: Re: [Flashcoders] extends MovieClip


> Look into the [Inspectable] metadata tag.
>
> If you place it before a class variable or property, then setting the
> class under the component definition will automatically populate the
> parameters.
>
> class MyClass {
>    //...
>    [Inspectable(defaultValue="default")]
>    public var myVar:String;
>    [Inspectable]
>    public function get myProp():Number {
>        return _prop;
>    }
>    public function set myProp(value:Number):Void {
>        _prop = isFinite(value) ? Math.floor(value) : 0;
>    }
>    private var _prop:Number;
>    //...
> }
>
> There are other options: enumeration, different types, etc.
>


_______________________________________________
Flashcoders@chattyfig.figleaf.com
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