displayGroup.getItemAt(0) should return the FXG object and then you should
be able to use the content management functions, i.e. to get the number of
items:

displayGroup.getItemAt(0).numItems

to get the second item:

displayGroup.getItemAt(0).getItemAt(1)


Haykel Ben Jemia

Allmas
Web & RIA Development
http://www.allmas-tn.com




On Wed, Dec 17, 2008 at 9:26 AM, Mic <[email protected]> wrote:

>   I think I need more help on this one :-( I found getElementAt(),
> getElementIndex() etc in the GraphicElement->ContentElement class, but
> not sure how to relate any of this to the loaded .fxg object:
>
> If I go to
>
> this.contentGroup
> __mxmlContent
> ____[0] VGroup (button group)
> ____[1] displayGroup (Group var containing .fxg object for display)
> ______mxmlContent
> ________[0].fxg Object
> __________myGroup1
> __________myGroup2 etc
>
> I still arrive at this mxmlContent array of 1 row containing the .fxg
> object with all the groups I want to reference. Any kind of
> getElementAt() at this level throws an index error talking about
> unknown mxml content. Am I even interrogating the correct instance? TIA,
>
> Mic.
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, "Haykel
> BEN JEMIA" <hayke...@...>
> wrote:
>
> >
> > You should use the content management functions of group to access its
> > children: numElements(), getElementAt(index:int),
> > getElementIndex(element:Object) etc.
> >
> > Haykel Ben Jemia
> >
> > Allmas
> > Web & RIA Development
> > http://www.allmas-tn.com
> >
> >
> >
> >
> > On Tue, Dec 16, 2008 at 10:28 PM, Mic <chigwel...@...> wrote:
> >
> > > (OK to ask Gumbo questions?)When an .fxg file is loaded into
> > > FxApplication and added to a Group, and that Group is then added to
> > > FxApplication, array mxmlContent[0] contains the .fxg Graphic object,
> > > whose child Groups can be accessed directly by name:
> > >
> > > displayGroup.mxmlContent[0].myGroup1
> > >
> > > However I cannot access mxmlContent[0] with getChildAt() etc, nor can
> > > I work out how to extract out references to mxmlContent[0] into
> > > another array etc so a list can be displayed where a Group object
> > > might be selected. Can find no info on mxmlContent :-(
> > >
> > > code:
> > > testFXG.fxg contains group id="myGroup1", group id="myGroup2" etc
> > >
> > > private var displayGroup:Group;
> > > displayGroup = new Group();
> > > var source: testFXG= new testFXG();
> > > displayGroup.addItem(source);
> > > addItem(displayGroup);
> > >
> > > breakpoint shows:
> > >
> > > displayGroup
> > > [inherited]
> > > mxmlContent
> > > [0]
> > > myGroup1
> > > myGroup2
> > > etc
> > >
> > > code:
> > > private var testGroup:Group;
> > > testGroup = displayGroup.mxmlContent[0].myGroup1;
> > >
> > > - this is a good reference and can be used to change myGroup1.x,
> > > myGroup1.y etc. However as stated above I cannot get a reference to
> > > e.g. the 3rd child etc. As always, TIA,
> > >
> > > Mic.
> > >
> > >
> > >
> >
>
>  
>

Reply via email to