Implicit getter/setters are called *before* the constructor of the class. This allows you to set properties in the initObj (the last parameter) when using attachMovie
var bubble = attachMovie("Bubble", "bubble_mc", getNextHighestDepth(), {text:"Hello World"}); regards, Muzak ----- Original Message ----- From: "Alexander Farber" <[EMAIL PROTECTED]> To: <flashcoders@chattyfig.figleaf.com> Sent: Sunday, March 18, 2007 2:46 PM Subject: Re: [Flashcoders] Inspectable parameters ignored in my 1st component > Thanks, I see - > > On 3/18/07, Michael Boski <[EMAIL PROTECTED]> wrote: >> what you want to do is add an inittext varible to hold the param until >> you finish initializing you text box and then push it in. >> >> this code works/ I tested it. >> >> the lines I added are 3 and have "// line added MOB" at the end of them. > >> private function createChildren():Void { >> rect_mc = this.createEmptyMovieClip('rect_mc', >> this.getNextHighestDepth()); >> text_txt = this.createTextField('text_txt', >> this.getNextHighestDepth(), 0, 0, 20, 20); >> text_txt.autoSize = true; >> text_txt.text = inittext; // line added MOB >> size(); >> } > >> [Inspectable(defaultValue="Set in TestCase.as - does not work", >> type='String')] >> public function set text(str:String):Void { >> inittext = str; // line added MOB >> text_txt.text = str; >> invalidate(); >> } > > - the text_txt is undefined when the set text() function > is called for the 1st time. I wonder what is the order > of how the functions are getting called: > > parameters from comp. inspector are being set > init() is called > createChildren() > and then? size(), draw()? > > Regards > Alex _______________________________________________ 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