Hi i tried using states to archive this but i dont know how to listen for 
completion of image loading. this is what i have so far. 

<mx:Canvas width="75" height="75">                      
                                <controls:SuperImage width="75" height="75" 
source="assets/homeprofile_pics/{data.img}" borderStyle="none" x="0" y="0" 
creationComplete="imgLoaded(event)"/>
                                <mx:SWFLoader source="assets/wait.swf" x="29.5" 
y="32.5" id="swfloader1"/>
                        </mx:Canvas>

i put the image and the spinner.swf in a canvas, the create another state where 
the spinner is taken out.

<mx:states>
                <mx:State name="remove_loader">
                        <mx:RemoveChild target="{swfloader1}"/>
                </mx:State>
        </mx:states>


then i call a function to change states once the image is fully loaded

private function imgLoaded(event:Event):void{
                        currentState = 'remove_loader';
                        }


this doesn't seem to work. any help? 

Reply via email to