Package | twaver.controls |
Class | public class GifImage |
Inheritance | GifImage ![]() |
UIComponent
.
With this class you can display an animated GIF in Flex UI.
Here is an example to define a GIF image resource:
//define a embed GIF image resource. [Embed(source="images/image.gif", mimeType="application/octet-stream")] public static const myGif:Class; //register this resource into TWaver Flex. Utils.registerImageByClass("myGif", GifImage, true, null, [ps, twaver.Consts.SHAPE_CIRCLE]); //use this resource in TWaver data. var node:Node = new Node(); node.image = "myGif"; box.add(node);
Property | Defined By | ||
---|---|---|---|
color : Object
Get the render color of this GIF image. | GifImage | ||
running : Boolean [read-only]
Check whether the animation is running. | GifImage | ||
shape : String
Get the image shape. | GifImage |
Method | Defined By | ||
---|---|---|---|
GifImage(source:Object, shape:String, autoPlay:Boolean = true)
Constructor. | GifImage | ||
start():void
Call this start play GIF image animation. | GifImage | ||
stop():void
Call this to stop playing GIF image animation. | GifImage |
Method | Defined By | ||
---|---|---|---|
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void [override] | GifImage |
color | property |
color:Object
Get the render color of this GIF image.
public function get color():Object
public function set color(value:Object):void
running | property |
running:Boolean
[read-only] Check whether the animation is running.
public function get running():Boolean
shape | property |
shape:String
Get the image shape.
public function get shape():String
public function set shape(value:String):void
GifImage | () | Constructor |
public function GifImage(source:Object, shape:String, autoPlay:Boolean = true)
Constructor.
Parameterssource:Object — can be embedded image resource or loaded remotely ByteArray.
use Class name if it is embedded image resource.
use new Object(){name="imageName", data=Loader.byte} if it is loaded remotely ByteArray
| |
shape:String (default = NaN ) — shape of GIF image. This value can be:
Default value is | |
autoPlay:Boolean (default = true ) — whether play this GIF animation at once when show
it up.
|
start | () | method |
public function start():void
Call this start play GIF image animation.
stop | () | method |
public function stop():void
Call this to stop playing GIF image animation.
updateDisplayList | () | method |
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Parameters
unscaledWidth:Number | |
unscaledHeight:Number |