I've been using the coverflow render item, but now I need to move it from mxml 
to actionscript so i started looking at what i can do and into addchild option.
I've not been successful in getting it to render my dynamic objects and im 
guessing the coverflow has already rendered and wont display them because it 
has to go through coverflow? How can i tell coverflow object to re-render ?


http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/


public function loadpanel(event:ResultEvent){
         var panel_c:Panel = new Panel();
         var label_c:Label = new Label();
        if(event.result.info.title != ""){
         panel_c.id = "panel1";
         label_c.id="label1";
         label_c.text = "WORKS";
         coverflow.addChild(panel_c);
         coverflow.addChild(label_c);
         
        }
        
} 




        <containers:CoverFlowContainer id="coverflow" width="100%" 
height="100%" 
        horizontalGap="1" borderStyle="inset" backgroundColor="0xFFFFFF" 
segments="9" reflectionEnabled="true">
                        
                                <!--mx:Panel width="310" height="280" 
title="{nutrition_http.lastResult.breakfast.itemdata[0].title}" 
horizontalAlign="center">
                                        <mx:Image 
source="/uploads/nutrition/{nutrition_http.lastResult.breakfast.itemdata[0].imgsource}"
 width="285" height="159"/>
                                        <mx:Label 
text="{nutrition_http.lastResult.breakfast.itemdata[0].serving} "/>
                                        <mx:Button label="Learn About This" 
click="test(nutrition_http.lastResult.breakfast.itemdata[0].swf);"/>
                                </mx:Panel-->
                                
                        </containers:CoverFlowContainer>
                        
                        <mx:HScrollBar id="scrollbar" width="100%" pageSize="1" 
maxScrollPosition="{coverflow.numChildren - 1}"
                                scrollPosition="{coverflow.selectedIndex}" 
                                scroll="coverflow.selectedIndex = 
Math.round(scrollbar.scrollPosition)" />
                </mx:VBox>      
                                                    

Reply via email to