Packagecom.gestureworks.cml.elements
Classpublic class Slideshow
InheritanceSlideshow Inheritance TouchContainer Inheritance com.gestureworks.core.TouchSprite

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
  autoplay : Boolean
Sets autoplay variable.
Slideshow
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainer
 InheritedchildList : ChildList
Returns the object's childList.
TouchContainer
 InheritedclassName : String
sets the class name of displayobject
TouchContainer
 InheritedcloneExclusions : Vector.<String>
[read-only] Returns a list of properties to exclude when cloning this object
TouchContainer
 InheritedcmlIndex : int
Returns the index created by the CML parser.
TouchContainer
  currentIndex : int
sets the current index of slides
Slideshow
 InheriteddimensionsTo : Object
Sets the dimensions of TouchContainer to given object
TouchContainer
 InheriteddropShadow : Boolean
Sets the drop shadow effect
TouchContainer
  fadeDuration : Number
Cross-fade duration in milliseconds, must be less than seqeunce rate
Slideshow
 Inheritedgroup : String
TouchContainer
 Inheritedheight : Number
[override] sets the height of the container
TouchContainer
 InheritedheightPercent : Number
sets the height of the container
TouchContainer
 Inheritedid : String
Returns the object's id.
TouchContainer
 Inheritedlayout : *
specifies the type of layout
TouchContainer
 InheritedlayoutList : Dictionary
TouchContainer
  loop : Boolean
Sets whether or not the sequence will loop once it reaches the end or beginning depending on play direction.
Slideshow
 InheritedmouseChildren : Boolean
[override] sets the mousechildren value to true or false.
TouchContainer
 InheritedpaddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
TouchContainer
 InheritedpaddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area.
TouchContainer
 InheritedpaddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area.
TouchContainer
 InheritedpaddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area.
TouchContainer
 Inheritedposition : *
Sets the position
TouchContainer
  rate : Number
Rate of change between slides in milliseconds
Slideshow
 InheritedrelativeX : Boolean
When set true this containers children's x position will be laid out relatively to each other.
TouchContainer
 InheritedrelativeY : Boolean
When set true this containers children's y position will be laid out relatively to each other.
TouchContainer
 Inheritedsound : String
TouchContainer
 Inheritedstate : Dictionary
TouchContainer
 InheritedstateId : *
Returns the current state id.
TouchContainer
 InheritedtoBitmap : Boolean
TouchContainer
 Inheritedwidth : Number
[override] sets the width of the container
TouchContainer
 InheritedwidthPercent : Number
sets the width of the container
TouchContainer
Protected Properties
 PropertyDefined By
 InheritedcmlGestureList : Object
TouchContainer
  timer : Timer
Slideshow
Public Methods
 MethodDefined By
  
Constructor
Slideshow
 Inherited
TouchContainer
 Inherited
method searches the child and adds to the list
TouchContainer
 Inherited
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
TouchContainer
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainer
  
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():*
Clone method
TouchContainer
  
dispose():void
[override] Destructor
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
getElementById(id:String):*
Searches CML childList by id.
TouchContainer
 Inherited
getElementsByClassName(className:String):Array
Searches the CML childList by className.
TouchContainer
 Inherited
getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class.
TouchContainer
  
init():void
[override] Initialisation method
Slideshow
 Inherited
loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number.
TouchContainer
 Inherited
makeGestureList(value:XMLList):Object
Creates gestureList object from XML
TouchContainer
  
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
Parse cml for local layouts.
TouchContainer
  
pause():void
pauses the slideshow
Slideshow
  
play():void
plays the slideshow
Slideshow
 Inherited
postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine.
TouchContainer
  
previous():void
Goes to the previous slide without restarting playback or changing play direction.
Slideshow
 Inherited
querySelector(selector:String):*
Searches the CML childList by selector.
TouchContainer
 Inherited
querySelectorAll(selector:*):Array
Search the CML childList by selector.
TouchContainer
 Inherited
removeChild(child:DisplayObject):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildAt(index:int):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void
[override] Removes children from display list and, if not already removed, the child list
TouchContainer
  
reverse():void
Slideshow
 Inherited
saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number.
TouchContainer
 Inherited
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
TouchContainer
 Inherited
method sets the dimensions of each child
TouchContainer
  
snapTo(index:Number):void
Slideshow
  
stop():void
stops the slideshow
Slideshow
 Inherited
tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index.
TouchContainer
 Inherited
Updates child padding within this container
TouchContainer
 Inherited
Updates child percent dimensions within this container
TouchContainer
 Inherited
updateProperties(state:* = 0):void
Updates properties from state.
TouchContainer
 Inherited
Updates child relative positions within this container
TouchContainer
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.

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

Destructor

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