Marlon,

So long as you know the container where the child exists, you can say:

container.getChildByName(name:String):DisplayObject 

or 

container.getChildIndex(child:DisplayObject):int 

Hope that helps,
Mike


--- In flexcoders@yahoogroups.com, "Marlon Moyer" <[EMAIL PROTECTED]>
wrote:
>
> sorry, I didn't phrase the question correctly.  I have the name of a
> component in a string variable (e.g. I've named a component
> 'name="repeater_state_{divisionRepeater.currentItem.id}") and now I
want to
> be able to refer to that component dynamically.
> 
> 
> On 10/16/06, Gordon Smith <[EMAIL PROTECTED]> wrote:
> >
> >    You simply refer to components by their id. You don't have to "look
> > them up" by it. For example, if you have
> >
> >
> >
> > MyApp.mxml:
> >
> >
> >
> > <mx:Application>
> >
> >     <mx::Canvas id="c1">
> >
> >         <mx:Button id="b1">
> >
> >        ...
> >
> >
> >
> > then in the Application's <mx:Script> methods you can write
expressions
> > like b1.label.
> >
> >
> >
> > Technically, what is happening is that the MXML compiler autogenerates
> >
> >
> >
> > var c1:Canvas;
> >
> > var b1:Button;
> >
> >
> >
> > as instance vars of a MyApp class which extends Application. The
methods
> > you write in the <mx:Script> become methods of this MyApp class,
so they can
> > acess these instance vars.
> >
> >
> >
> > To access components inside components, you simply use the dot
operator.
> >
> >
> >
> > - Gordon
> >
> >
> >  ------------------------------
> >
> > *From:* flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] *On
> > Behalf Of *Marlon Moyer
> > *Sent:* Sunday, October 15, 2006 7:03 PM
> > *To:* flexcoders@yahoogroups.com
> > *Subject:* [flexcoders] Is there a way to find an object if you
know the
> > name
> >
> >
> >
> > What's the equivalent of javascript's getElementById in Flex? I've
> > searched the help files numerous times and can't seem to find it.
> >
> > Thanks
> >
> > --
> > Marlon
> >
> >  
> >
> 
> 
> 
> -- 
> Marlon
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to