I have a repeater inside a Viewstack working fine. i.e., the Tree component gets created over and over as expected, however, I would like to access an array of all the <mx:Image> instances, so I can load images into them with Actionscript later (the file name for the image is not loaded into the app until after the repeater runs and the XML is loaded).
I thought inside a repeater, the examples I have seen (http://www.adobe.com/devnet/flex/quickstart/using_the_repeater/ - see the last example on that page) indicate that the id tag converts to an array of each repeated component. However, when I trace _image.length (ensuring I'm checking after Application.COMPLETE fires), it's always 1, even though the dataprovider length for the repeater is 5. Here is the relevant MXML part of my script: <mx:ViewStack selectedIndex="{buttonBar.selectedIndex}"> <mx:Repeater id="cubeSideRepeater" dataProvider="{arr}" > <mx:VBox width="{vBoxWidth}" height="{toggleButtonBarHeight}" backgroundColor="{vBoxBackgroundColor}"verticalAlign="middle" horizontalAlign="center" hideEffect="cache" showEffect="cube"> <mx:HBox> <mx:Tree borderThickness="0" width="{treeWidth}" height="100%" dataProvider="{_currentTreeNode}" labelField="@label" itemClick="treeItemClicked(event)" /> <mx:Spacer width="5"/> <mx:Image id="_images" /> </mx:HBox> </mx:VBox> </mx:Repeater> </mx:ViewStack> How would you handle this? Jason Merrill <<Picture (Device Independent Bitmap)>> Bank of America | Learning Performance Solutions Instructional Technology & Media Learn about the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community <http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx> Anyone can follow my nonsense on Twitter: jmerrill_2001. If you know me personally, follow more nonsense on Facebook. .
<<attachment: ole0.bmp>>