<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
 xmlns:mccune="com.dougmccune.controls.*" viewSourceURL="http://dougmccune.com/flex/animatedgifloader/srcview/index.html"  >
    
    
    <mx:HBox horizontalAlign="center" width="100%">
        

        <mx:VBox width="454">
            
            <mx:VBox paddingLeft="5"  paddingRight="5" paddingTop="5" paddingBottom="5"
                width="452" height="100%" backgroundColor="0xffffff" borderStyle="solid" 
                borderColor="0x666666" cornerRadius="10" verticalGap="0" dropShadowEnabled="true">
                
                <mx:TextArea text="Here's an example of loading the same image into the AnimatedGifLoader and the regular SWFLoader component in the Flex Framework."  
                    width="100%" editable="false" wordWrap="true" borderStyle="none" backgroundAlpha="0.0"/>
                    
                <mx:TextArea text="The SWFLoader in the Flex Framework only loads the first frame of the animation. AnimatedGifLoader loads and plays the entire animation and also gives you control over playback."  
                    width="100%" editable="false" wordWrap="true" borderStyle="none" backgroundAlpha="0.0"/>
            
            </mx:VBox>
        
            <mx:HBox>
                <mx:Panel title="AnimatedGifLoader" borderStyle="solid" backgroundAlpha="0.5" height="100%">
                    
                    <!-- Here's the magic AnimatedGifLoader Component -->
                    <mccune:AnimatedGifLoader id="loader" width="100%" height="100%"
                        source="animated_gif.gif" autoPlay="true" />
                    
                    <mx:Label text="Is playing: {loader.playing}" />
                    <mx:Label text="Current frame: {loader.currentFrame}" />
                    
                    <mx:ControlBar>
                         <mx:Button label="Pause" enabled="{loader.playing}" click="loader.pause()" />
                         <mx:Button label="Play" enabled="{!loader.playing}" click="loader.play()" />
                    </mx:ControlBar>
                    
                </mx:Panel>
                
                
                <mx:Panel title="SWFLoader" borderStyle="solid" backgroundAlpha="0.5" height="100%">
                    
                    <!-- And here's the old SWFLoader component included in the Flex Framework -->
                    <mx:SWFLoader width="100%" height="100%"
                        source="animated_gif.gif" />
                
                </mx:Panel>
            </mx:HBox>
        
            <mx:LinkButton click="navigateToURL(new URLRequest('http://dougmccune.com/blog'))" label="http://www.dougmccune.com/blog"  fontWeight="bold" fontStyle="italic" fontSize="11"/>
        </mx:VBox>
    </mx:HBox>




</mx:Application>