Packagecom.gestureworks.cml.element
Classpublic class Slideshow
InheritanceSlideshow Inheritance Container Inheritance ContainerFactory Inheritance ElementFactory Inheritance flash.display.Sprite

The Slideshow element takes a set of display objects to its childList and plays through them with a crossfade set through tis rate and fade duration. The Slideshow element can be set to autoplay and loop, and has play(), pause(), and resume() functions accessible by other classes or AS3 code. Slideshow element can take anything that is a display object.
     
       var slideShow:Slideshow = new Slideshow();
        slideShow.x = 500;
        slideShow.y = 100;
        slideShow.rate = 2000;
        slideShow.fadeDuration = 1000;
        slideShow.loop = true;
        slideShow.autoplay = true;
        
        addChild(slideShow);
        
        slideShow.addChild(text1);
        slideShow.childToList("text1", text1);
        slidheShow.addChild(graphic1);
        slideShow.childToList("circle", graphic1);
        slideShow.init();
     
     

See also

Container


Public Properties
 PropertyDefined By
 Inheritedalpha : Number
[override] [write-only] sets the alpha for display objects
ElementFactory
  autoplay : Boolean
Sets autoplay variable.
Slideshow
 Inheritedblur : Boolean
Sets the drop shadow effect
ElementFactory
 Inheritedbottom : Number
sets the bottom value
ElementFactory
 InheritedchildList : ChildList
[read-only] store the child list
ContainerFactory
 Inheritedclass_ : String
Object's css class;
ElementFactory
 InheritedclassName : String
sets the class name of displayobject
ElementFactory
 InheritedcmlIndex : int
sets the cml index
ElementFactory
  currentIndex : int
sets the current index of slides
Slideshow
 InheriteddebugStyle : *
sets the debug style
ElementFactory
 InheriteddimensionsTo : String
sets the dimensions of the container
ContainerFactory
 InheriteddisplayEvents : String
Use for dispatch completes.
ElementFactory
 InheriteddropShadow : Boolean
Sets the drop shadow effect
ElementFactory
  fadeDuration : Number
Cross-fade duration in milliseconds, must be less than seqeunce rate
Slideshow
 Inheritedheight : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedheightPercent : String
sets the height percent of display object
ElementFactory
 InheritedhorizontalCenter : Number
sets the horizontal center of display object
ElementFactory
 Inheritedid : String
sets the id of child
ElementFactory
 Inheritedindex : int
sets the index of display object
ElementFactory
 InheritedinfoSource : String
sets info source
ContainerFactory
 Inheritedlayout : *
Sets the layout of the container
Container
 InheritedlayoutComplete : Function
Sets the function to call when the layout is complete
Container
 InheritedlayoutList : Dictionary
Defines the layoutlist
Container
 InheritedlayoutUpdate : Function
Sets the function to call when the layout updates
Container
 Inheritedleft : Number
sets left value
ElementFactory
  loop : Boolean
Sets whether or not the sequence will loop once it reaches the end or beginning depending on play direction.
Slideshow
 InheritedpaddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
Container
 InheritedpaddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area.
Container
 InheritedpaddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area.
Container
 InheritedpaddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area.
Container
 Inheritedposition : String
Sets the position
Container
 InheritedpropertyStates : Array
Deprecated: Please Use state
ElementFactory
  rate : Number
Rate of change between slides in milliseconds
Slideshow
 Inheritedright : Number
sets the right value
ElementFactory
 Inheritedscale : Number
Sets both the x and y scale values
ElementFactory
 InheritedscaleX : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedscaleY : Number
[override] Sets width of the display object in pixels
ElementFactory
 Inheritedstate : Array
property states array
ElementFactory
 Inheritedtop : Number
sets top value
ElementFactory
 InheritedverticalCenter : Number
sets the vertical center of display object
ElementFactory
 Inheritedwidth : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedwidthPercent : String
sets the percent of width of display object
ElementFactory
Protected Properties
 PropertyDefined By
  timer : Timer
Slideshow
Public Methods
 MethodDefined By
  
Constructor
Slideshow
 Inherited
This method searches the childlist and add the children
ContainerFactory
 Inherited
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list TODO: This mechanism should be abstracted to better syncrhonize child and display lists
Container
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
Container
 Inherited
childToList(id:String, child:*):void
this method append to the childlist
ContainerFactory
  
clear():void
Method to clear children and reset the childlist so the slideshow can be repopulated by running init without simply appending or duplicating itself or the ChildList.
Slideshow
 Inherited
clone():*
Returns clone of self
ElementFactory
  
[override] CML callback Initialisation
Slideshow
  
dispose():void
[override] Dispose method to remove children
Slideshow
  
fadein(index:int):void
adds the slideshow items and tweening for current item
Slideshow
  
fadeout(index:int):void
tweening for last item and removes the slide show items
Slideshow
  
forward():void
resume method
Slideshow
 Inherited
getIndex(index:int):*
returns childlist index
Container
 Inherited
getKey(key:String):*
returns the childlist key
Container
 Inherited
hideIndex(index:int):void
hides the childlist index
Container
 Inherited
hideKey(key:String):void
hides the childlist key
Container
  
init():void
[override] Initialisation method
Slideshow
  
next():void
Goes to the next slide without restarting playback or changing play direction.
Slideshow
  
onComplete(event:TimerEvent):void
plays the slideshow
Slideshow
  
onTimer(event:TimerEvent):void
timer event
Slideshow
 Inherited
parseCML(cml:XMLList):XMLList
[override] Parse cml for local layouts.
Container
  
pause():void
pauses the slideshow
Slideshow
  
play():void
plays the slideshow
Slideshow
 Inherited
postparseCML(cml:XMLList):void
post parses the cml file
ElementFactory
  
previous():void
Goes to the previous slide without restarting playback or changing play direction.
Slideshow
  
reverse():void
Slideshow
 Inherited
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
Container
 Inherited
This method sets the dimensions of childlist
ContainerFactory
 Inherited
showIndex(index:int):void
shows the childlist index
Container
 Inherited
showKey(key:String):void
shows the childlist key
Container
  
snapTo(index:Number):void
Slideshow
  
stop():void
stops the slideshow
Slideshow
 Inherited
updateProperties(state:Number = 0):void
this method updates the properties
ElementFactory
Protected Methods
 MethodDefined By
  
reset():void
Slideshow
  
showNext():void
Slideshow
  
showPrev():void
Slideshow
Property Detail
autoplayproperty
autoplay:Boolean

Sets autoplay variable.


Implementation
    public function get autoplay():Boolean
    public function set autoplay(value:Boolean):void
currentIndexproperty 
currentIndex:int

sets the current index of slides

The default value is =-1;.


Implementation
    public function get currentIndex():int
    public function set currentIndex(value:int):void
fadeDurationproperty 
fadeDuration:Number

Cross-fade duration in milliseconds, must be less than seqeunce rate

The default value is 250.


Implementation
    public function get fadeDuration():Number
    public function set fadeDuration(value:Number):void
loopproperty 
loop:Boolean

Sets whether or not the sequence will loop once it reaches the end or beginning depending on play direction.


Implementation
    public function get loop():Boolean
    public function set loop(value:Boolean):void
rateproperty 
rate:Number

Rate of change between slides in milliseconds

The default value is 1000.


Implementation
    public function get rate():Number
    public function set rate(value:Number):void
timerproperty 
protected var timer:Timer

Constructor Detail
Slideshow()Constructor
public function Slideshow()

Constructor

Method Detail
clear()method
public function clear():void

Method to clear children and reset the childlist so the slideshow can be repopulated by running init without simply appending or duplicating itself or the ChildList.

displayComplete()method 
override public function displayComplete():void

CML callback Initialisation

dispose()method 
override public function dispose():void

Dispose method to remove children

fadein()method 
public function fadein(index:int):void

adds the slideshow items and tweening for current item

Parameters

index:int

fadeout()method 
public function fadeout(index:int):void

tweening for last item and removes the slide show items

Parameters

index:int

forward()method 
public function forward():void

resume method

init()method 
override public function init():void

Initialisation method

next()method 
public function next():void

Goes to the next slide without restarting playback or changing play direction.

onComplete()method 
public function onComplete(event:TimerEvent):void

plays the slideshow

Parameters

event:TimerEvent

onTimer()method 
public function onTimer(event:TimerEvent):void

timer event

Parameters

event:TimerEvent

pause()method 
public function pause():void

pauses the slideshow

play()method 
public function play():void

plays the slideshow

previous()method 
public function previous():void

Goes to the previous slide without restarting playback or changing play direction.

reset()method 
protected function reset():void

reverse()method 
public function reverse():void

showNext()method 
protected function showNext():void

showPrev()method 
protected function showPrev():void

snapTo()method 
public function snapTo(index:Number):void

Parameters

index:Number

stop()method 
public function stop():void

stops the slideshow