hi i have a tilelist and i use the selectedItem to populate an array
which i then used as a dataprovider for my displayshelf component to
show images. when i click an item in the tilelist, the array is
populated and my images show up, but when i select another object in
the tilelist the images are not changed more like the array is not
being refreshed. any advise. here is my code

"gallery.mxml"

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"; width="100%"
height="100%" xmlns:local="com.*">

        <mx:Binding source="sel.value" destination="shelf.selectedIndex" />
        <mx:Binding destination="sel.value" source="shelf.selectedIndex" />
        
        <mx:Binding source="angle.value" destination="shelf.angle" />
        <mx:Binding source="pop.value" destination="shelf.popout" />
        
        
        
        <mx:Array id="img">                             
                
<mx:String>assets/extra_pics/{parentDocument.tiles.selectedItem.img1}</mx:String>
                
<mx:String>assets/extra_pics/{parentDocument.tiles.selectedItem.img2}</mx:String>
                
<mx:String>assets/extra_pics/{parentDocument.tiles.selectedItem.img3}</mx:String>
                
<mx:String>assets/extra_pics/{parentDocument.tiles.selectedItem.img4}</mx:String>
                
        </mx:Array>


        <local:DisplayShelf id="shelf"  horizontalCenter="0"
verticalCenter="0"      borderThickness="5" borderColor="#FFFFFF"
dataProvider="{img}" enableHistory="false" width="100%"/>
        <mx:VBox horizontalCenter="0" bottom="10" horizontalAlign="center"
verticalAlign="middle" width="100%">
                <mx:HBox width="100%">
                        <mx:Label text="Angle:"  width="75"/>
                        <mx:HSlider liveDragging="true" id="angle" minimum="5" 
value="20"
maximum="90" snapInterval=".1" width="100%" />
                </mx:HBox>

                <mx:HBox width="100%">
                        <mx:Label text="Selection:"  width="75"/>
                        <mx:HSlider liveDragging="true" id="sel" minimum="0" 
value="0"
maximum="{shelf.dataProvider.length}" snapInterval="1" width="100%" />
                </mx:HBox>

                <mx:HBox width="100%">
                        <mx:Label text="pop:"  width="75"/>
                        <mx:HSlider liveDragging="true" id="pop" minimum="0" 
value=".8"
maximum="1" snapInterval=".01" width="100%" />
                </mx:HBox>
        </mx:VBox>
</mx:Canvas>


Reply via email to