ok, thanks guys. we got it figured out. he was instantiating a sub class of
the component that is not supposed to be used. here is the code:

var frame:HTMLIFrame = new HTMLIFrame({id: "frame0"});

This does work:

var frame:HTML = new HTML();
frame.source = "http://www.google.com <http://www.arc90.com/>";




On 5/7/07, Manish Jethani <[EMAIL PROTECTED]> wrote:

  On 5/7/07, dorkie dork from dorktown <[EMAIL 
PROTECTED]<dorkiedorkfromdorktown%40gmail.com>>
wrote:
> I created a MXML component that someone is trying to create dynamically
in
> AS3. They said, "the constructor requires an object as its argument.
What
> are the properties of this object?"
>
> Since MXML components do not have constructor what do I tell him?

Did *you* create the component? If yes, what value are you accepting
in the constructor?

You can make the contructor args optional and expose public property
for the same.

For example:

public function MyComponent(label:String = null /* optional */) {
_label = label;
}

public function set label(value:String):void {
_label = value;
}

Obviously you can make label bindable, call invalidateProperties() in
the setter, etc., but I assume you already know that.

Reply via email to