Packagecom.dougmccune.controls
Classpublic class AnimatedGifLoader
InheritanceAnimatedGifLoader Inheritance SWFLoader Inheritance mx.core.UIComponent
SubclassesAnimatedGif

The AnimatedGifLoader control works the same way as the SWFLoader control in the Flex framework, except it loads and runs gif animations in animated gif files.

The component is used just as you would use SWFLoader, by setting the source attribute and specifying the file yopu want to load. You can load images by URL or you can use

MXML Syntaxexpanded Hide MXML Syntax

The <mccune:AnimatedGifLoader> tag inherits the tag attributes of its superclass, and adds the following tag attribute:

   <mccune:AnimatedGif
     Properties
    autoPlay="true|false"
    currentFrame="No Default"
    delay="-1"
    frames="No Default"
    isGif="true|false"
    numFrames="Read-only"
    playing="true|false"
    smoothing="true|false"
  
   />
   

See also

http://livedocs.adobe.com/flex/2/langref/mx/controls/SWFLoader.html


Public Properties
 PropertyDefined by
 InheritedautoLoad : Boolean
A flag that indictes whether content starts loading automatically or waits for a clal to the load() method.
SWFLoader
  autoPlay : Boolean
Indicates whether the animation should being playing once the GIF loads.
AnimatedGifLoader
 InheritedbytesLoaded : Number
The number of bytes of the SWF or image file already loaded.
SWFLoader
 InheritedbytesTotal : Number
The total size of the SWF or image file.
SWFLoader
 Inheritedcontent : DisplayObject
This property contains the object that represents the content that was loaded in the SWFLoader control.
SWFLoader
  contentHeight : Number
[read-only]
AnimatedGifLoader
  contentWidth : Number
[read-only]
AnimatedGifLoader
  currentFrame : int
The current frame of the animation.
AnimatedGifLoader
  delay : Number
If set to -1 the component will use the delay timings contained in the gif file.
AnimatedGifLoader
  frames : ArrayCollection
An ArrayCollection that holds Bitmap objects for each frame of the loaded animation.
AnimatedGifLoader
  isGif : Boolean
[read-only] True if the image loaded is an actual gif image (animated or not).
AnimatedGifLoader
 InheritedloaderContext : LoaderContext
A LoaderContext object to use to control loading of the content.
SWFLoader
 InheritedmaintainAspectRatio : Boolean
A flag that indicates whether to maintain the aspect ratio of the loaded content.
SWFLoader
  numFrames : Number
[read-only] THe number of frames in the gif animation.
AnimatedGifLoader
 InheritedpercentLoaded : Number
The percentage of the image or SWF file already loaded.
SWFLoader
  playing : Boolean
Boolean indicating if the animation is playing.
AnimatedGifLoader
 InheritedscaleContent : Boolean
A flag that indicates whether to scale the content to fit the size of the control or resize the control to the content's size.
SWFLoader
 InheritedshowBusyCursor : Boolean
A flag that indicates whether to show a busy cursor while the content loads.
SWFLoader
  smoothing : Boolean
Boolean flag indicating whether bitmap smoothing should be used.
AnimatedGifLoader
 Inheritedsource : Object
The URL, object, class or string name of a class to load as the content.
SWFLoader
 InheritedtrustContent : Boolean
If true, the content is loaded into your security domain.
SWFLoader
Public Methods
 MethodDefined by
  
cleanup():void
Triggers calls to dispose() on all bitmapData objects that have been created.
AnimatedGifLoader
 Inherited
load(url:Object = null):void
Loads an image or SWF file.
SWFLoader
Protected Methods
 MethodDefined by
  
initializeHandler(event:FlexEvent):void
AnimatedGifLoader
Events
 EventSummaryDefined by
 Inherited Dispatched when content loading is complete.SWFLoader
 Inherited Dispatched when a network request is made over HTTP and Flash Player can detect the HTTP status code.SWFLoader
 Inherited Dispatched when the properties and methods of a loaded SWF file are accessible.SWFLoader
 Inherited Dispatched when an input/output error occurs.SWFLoader
 Inherited Dispatched when a network operation starts.SWFLoader
 Inherited Dispatched when content is loading.SWFLoader
 Inherited Dispatched when a security error occurs while content is loading.SWFLoader
 Inherited Dispatched when a loaded object is removed, or when a second load is performed by the same SWFLoader control and the original content is removed prior to the new load beginning.SWFLoader
Styles
 StyleDescriptionDefined by
 Inherited Type: Class   CSS Inheritance: no
The name of class to use as the SWFLoader border skin if the control cannot load the content.
SWFLoader
 Inherited Type: Class   CSS Inheritance: no
The name of the class to use as the SWFLoader skin if the control cannot load the content.
SWFLoader
 Inherited Type: String   CSS Inheritance: no
The horizontal alignment of the content when it does not have a one-to-one aspect ratio.
SWFLoader
 Inherited Type: String   CSS Inheritance: no
The vertical alignment of the content when it does not have a one-to-one aspect ratio.
SWFLoader
Effects
 EffectDescriptionDefined by
 Inherited Triggering event: complete
An effect that is started when the complete event is dispatched.
SWFLoader
Property detail
autoPlayproperty
autoPlay:Boolean  [read-write]

Indicates whether the animation should being playing once the GIF loads. If this is set to false the animation will load the first frame and remain paused until the play() method gets called.

The default value is true.

Implementation
    public function get autoPlay():Boolean
    public function set autoPlay(value:Boolean):void
contentHeightproperty 
contentHeight:Number  [read-only]

This property can be used as the source for data binding.

Implementation
    public function get contentHeight():Number
contentWidthproperty 
contentWidth:Number  [read-only]

This property can be used as the source for data binding.

Implementation
    public function get contentWidth():Number
currentFrameproperty 
currentFrame:int  [read-write]

The current frame of the animation. If this is set while the animation is playing the animation will play from the new value.

This property can be used as the source for data binding.

Implementation
    public function get currentFrame():int
    public function set currentFrame(value:int):void
delayproperty 
delay:Number  [read-write]

If set to -1 the component will use the delay timings contained in the gif file. If you set this to a number other than -1 then the number you set will be used as the delay between each frame of the gif animation.

The default value is -1.

Implementation
    public function get delay():Number
    public function set delay(value:Number):void
framesproperty 
public var frames:ArrayCollection

An ArrayCollection that holds Bitmap objects for each frame of the loaded animation. This ArrayCollection will get set once all the frames have loaded.

This property can be used as the source for data binding.

isGifproperty 
isGif:Boolean  [read-only]

True if the image loaded is an actual gif image (animated or not). False if the image is a different file type.

This property can be used as the source for data binding.

Implementation
    public function get isGif():Boolean
numFramesproperty 
numFrames:Number  [read-only]

THe number of frames in the gif animation. This gets set after the gif has fully loaded.

This property can be used as the source for data binding.

Implementation
    public function get numFrames():Number
playingproperty 
playing:Boolean  [read-write]

Boolean indicating if the animation is playing. You can set this to true or false to stop/start the animation.

This property can be used as the source for data binding.

Implementation
    public function get playing():Boolean
    public function set playing(value:Boolean):void
smoothingproperty 
smoothing:Boolean  [read-write]

Boolean flag indicating whether bitmap smoothing should be used.

This property can be used as the source for data binding.

Implementation
    public function get smoothing():Boolean
    public function set smoothing(value:Boolean):void
Method detail
cleanup()method
public function cleanup():void

Triggers calls to dispose() on all bitmapData objects that have been created. This gets called automatically if you load a new file, but is made public for convenience in case you ever want to make sure all bitmaps that have been created by this component are disposed. For normal use you do not need to call this method directly.

initializeHandler()method 
protected override function initializeHandler(event:FlexEvent):voidParameters
event:FlexEvent