jazzman121
03-19-2009, 04:14 AM
hey guys im new to flex.. so excuse my questions if they seem
simple...
I have xml data that has categories
and images in different categories
<photos>
<category label="washington">
<image url="images/washington1.jpg">Washington 1</image>
<image url="images/washington2.jpg">Washington 2</image>
<image url="images/washington3.jpg">Washington 3</image>
</category>
<category label="nashville">
<image url="images/nashville1.jpg">nashville 1</image>
<image url="images/nashville2.jpg">nashville 2</image>
</category>
</photos>
in my application the way I want to show these images are using two
controls.. ( and maybe you can suggest a better way to go about this )
the accordion to put the images in categories and the tile control to
lay them out
<mx:Accordion id="accordion1" name="accordion1"
y="24"
width="320"
headerHeight="30"
horizontalCenter="143"
headerStyleName="accHeader"
resizeToContent="true"
color="#000000" >
<mx:Canvas label="Washington" width="100%" height="100%">
<mx:Tile direction="horizontal"
horizontalGap="3" verticalGap="3"
paddingTop="3" paddingBottom="3" paddingLeft="3"
paddingRight="3" >
<mx:Image id="image1" name="image1" source="images/washington1.jpg"></mx:Image>
<mx:Image id="image2" name="image2" source="images/washington2.jpg"></mx:Image>
<mx:Image id="image3" name="image3" source="images/washington3.jpg"></mx:Image>
</mx:Tile>
</mx:Canvas>
<mx:Canvas label="Nashville" width="100%" height="100%">
<mx:Tile direction="horizontal"
horizontalGap="3" verticalGap="3"
paddingTop="3" paddingBottom="3" paddingLeft="3"
paddingRight="3" >
<mx:Image id="image4" name="image4" source="images/nashville1.jpg"></mx:Image>
<mx:Image id="image5" name="image5" source="images/nashville2.jpg"></mx:Image>
</mx:Tile>
</mx:Canvas>
</mx:Accordion>
So my question is how do I get the xml data to dynamiclly generate the
images in the Tile control and ofcourse the Canvas control too
I hope that makes sense
thanks
simple...
I have xml data that has categories
and images in different categories
<photos>
<category label="washington">
<image url="images/washington1.jpg">Washington 1</image>
<image url="images/washington2.jpg">Washington 2</image>
<image url="images/washington3.jpg">Washington 3</image>
</category>
<category label="nashville">
<image url="images/nashville1.jpg">nashville 1</image>
<image url="images/nashville2.jpg">nashville 2</image>
</category>
</photos>
in my application the way I want to show these images are using two
controls.. ( and maybe you can suggest a better way to go about this )
the accordion to put the images in categories and the tile control to
lay them out
<mx:Accordion id="accordion1" name="accordion1"
y="24"
width="320"
headerHeight="30"
horizontalCenter="143"
headerStyleName="accHeader"
resizeToContent="true"
color="#000000" >
<mx:Canvas label="Washington" width="100%" height="100%">
<mx:Tile direction="horizontal"
horizontalGap="3" verticalGap="3"
paddingTop="3" paddingBottom="3" paddingLeft="3"
paddingRight="3" >
<mx:Image id="image1" name="image1" source="images/washington1.jpg"></mx:Image>
<mx:Image id="image2" name="image2" source="images/washington2.jpg"></mx:Image>
<mx:Image id="image3" name="image3" source="images/washington3.jpg"></mx:Image>
</mx:Tile>
</mx:Canvas>
<mx:Canvas label="Nashville" width="100%" height="100%">
<mx:Tile direction="horizontal"
horizontalGap="3" verticalGap="3"
paddingTop="3" paddingBottom="3" paddingLeft="3"
paddingRight="3" >
<mx:Image id="image4" name="image4" source="images/nashville1.jpg"></mx:Image>
<mx:Image id="image5" name="image5" source="images/nashville2.jpg"></mx:Image>
</mx:Tile>
</mx:Canvas>
</mx:Accordion>
So my question is how do I get the xml data to dynamiclly generate the
images in the Tile control and ofcourse the Canvas control too
I hope that makes sense
thanks