Package | com.dougmccune.controls |
Class | public class AnimatedGifLoader |
Inheritance | AnimatedGifLoader ![]() ![]() |
Subclasses | AnimatedGif |
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
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
Property | Defined by | ||
---|---|---|---|
![]() | autoLoad : 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 | ||
![]() | bytesLoaded : Number
The number of bytes of the SWF or image file already loaded.
| SWFLoader | |
![]() | bytesTotal : Number
The total size of the SWF or image file.
| SWFLoader | |
![]() | content : 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 | ||
![]() | loaderContext : LoaderContext
A LoaderContext object to use to control loading of the content.
| SWFLoader | |
![]() | maintainAspectRatio : 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 | ||
![]() | percentLoaded : Number
The percentage of the image or SWF file already loaded.
| SWFLoader | |
playing : Boolean
Boolean indicating if the animation is playing.
| AnimatedGifLoader | ||
![]() | scaleContent : 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 | |
![]() | showBusyCursor : 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 | ||
![]() | source : Object
The URL, object, class or string name of a class to
load as the content.
| SWFLoader | |
![]() | trustContent : Boolean
If
true , the content is loaded
into your security domain. | SWFLoader |
Method | Defined by | ||
---|---|---|---|
cleanup():void
Triggers calls to dispose() on all bitmapData objects that have been created.
| AnimatedGifLoader | ||
![]() |
load(url:Object = null):void
Loads an image or SWF file.
| SWFLoader |
Method | Defined by | ||
---|---|---|---|
initializeHandler(event:FlexEvent):void
| AnimatedGifLoader |
autoPlay | property |
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
.
public function get autoPlay():Boolean
public function set autoPlay(value:Boolean):void
contentHeight | property |
contentHeight:Number
[read-only]This property can be used as the source for data binding.
Implementation public function get contentHeight():Number
contentWidth | property |
contentWidth:Number
[read-only]This property can be used as the source for data binding.
Implementation public function get contentWidth():Number
currentFrame | property |
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
delay | property |
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
.
public function get delay():Number
public function set delay(value:Number):void
frames | property |
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.
isGif | property |
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
numFrames | property |
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
playing | property |
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
smoothing | property |
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
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):void
Parameters
event:FlexEvent |