Jumping in: var myID:String = String(event.result[0]);
Var rte:RichTextEditor = this[myID]; rte.htmlText = "TEST"; Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson Sent: Wednesday, April 11, 2007 4:37 PM To: [email protected] Subject: [flexcoders] Re: Changing a string to reference an ID of an Object Yes, but if "item1" gets passed back as a string in my result event I don't know how to reference it. I.E. var myID:String = String(event.result[0]) Now how do I reference the RTE with that ID? --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Doug Lowder" <[EMAIL PROTECTED]> wrote: > > Hi Nate, > > The id property of mxml components just tells the compiler what to name > the instance variable when it generates the actionscript code. So, > your mxml object with id "item1" can be referenced in script as simply > item1: > > item1.htmlText = "TEST"; > > Search the archives for more info; there are some really good posts on > this topic direct from the Adobe folks. > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Nate Pearson" <napearson99@> > wrote: > > > > I am calling a webservice to get text for an item(RichTextEditor) that > > I am adding dynamically. > > > > If i set the ID of the rte to "item1" how do I reference that in my > > webservice handler? I have the string pass through so that the > > handler knows that the ID should be item1. > > > > I've tried: > > RichTextEditor("item1").htmlText = "TEST" > > > > and > > > > RichTextEditor(this.getChildByName("item1")).htmlText = "TEST" > > > > but neither work. Any help is greatly appreciated. > > >

