Packagecom.dwuser.ss4.utils
Classpublic class KBEffect

Instances of the KBEffect class are used to represent individual Ken Burns (KB) effect instances. KB Effects are composite effects which define both panning and zooming for an image. There are two different states which are defined, each having a relative x/y coordinate and zoom level - the beginning state, where the image starts, and the ending states, where the effect transitions to at completion. See all of the properties below for more information about each. Coordinate values can be left at 0 to disable panning; zooming values can be set to 1 to disable zooming.

XML Implementation Information:

KBEffect instances are defined through the <kbEffect ... /> nodes in the <kenburns> section of the XML configuration file. Each <kbEffect ... /> node has a unique id attribute. This id value is referenced whenever a KB effect is applied to either an image or a gallery through the <img|gallery|galleries ... kbEffect="idValueHere" > attribute. Thus, each unique KB effect need only be defined once, but it can be reused many times by simply referencing its unique id value.

Example node, which is automatically used to create a KBEffect instance accessible through the KBManager:

   <kbEffect
      id="Unique ID Value"
      startX="0" 
      startY="0"    
      startZoom="1.2" 
      endX="0" 
      endY="0" 
      endZoom="1" 
      delay="500" 
      duration="5000" 
      easing="Easing(Quadratic.easeInOut)"
   />
   

For more information, also see the KBManager class.

See also

com.dwuser.ss4.managers.KBManager


Public Properties
 PropertyDefined by
  delay : Number
Specifies the delay, in milliseconds, before the effect begins to play once an image has been opened.
KBEffect
  duration : Number
Specifies the duration of the effect, in milliseconds.
KBEffect
  easing : Function
Specifies the easing function to be used for the effect.
KBEffect
  endX : Number
The ending x-position of the effect.
KBEffect
  endY : Number
The ending y-position of the effect.
KBEffect
  endZoom : Number
The ending zoom factor of the effect, with 1 being normal size.
KBEffect
  startX : Number
The starting x-position of the effect.
KBEffect
  startY : Number
The starting y-position of the effect.
KBEffect
  startZoom : Number
The starting zoom factor of the effect, with 1 being normal size.
KBEffect
Public Methods
 MethodDefined by
  
KBEffect(startX:Number = 0, startY:Number = 0, startZoom:Number = 1.2, endX:Number = 0, endY:Number = 0, endZoom:Number = 1, delay:Number = 500, duration:Number = 5000, easing:Function = null)
KBEffect
Property detail
delayproperty
public var delay:Number

Specifies the delay, in milliseconds, before the effect begins to play once an image has been opened.

The default value is 500.

durationproperty 
public var duration:Number

Specifies the duration of the effect, in milliseconds.

The default value is 5000.

easingproperty 
public var easing:Function

Specifies the easing function to be used for the effect.

The following format is used when specifying an easing equation in a <kbEffect ... /> node in the XML configuration file:

    <kbEffect ... easing="Easing(Quartic.easeInOut)" />
    

To learn about the possible easing values, see the EASING_FUNCTION_REFERENCE constant reference on the com.dwuser.ss4.pseudoStyleClasses.XMLAttributeFormats documentation class.

To use no easing, specify Easing(Linear.none) .

The default value is Easing(Quartic.easeInOut).

See also

endXproperty 
public var endX:Number

The ending x-position of the effect.

A negative number equates to an effect which finishes panning at the left side of the image; a positive number equates to an effect which finishes panning at the right side of the image.

To make the panning always end at the very left or right edge of the image, specify a very large value (such as -1000 or 1000).

The default value is 0.

endYproperty 
public var endY:Number

The ending y-position of the effect.

A negative number equates to an effect which finishes panning at the top side of the image; a positive number equates to an effect which finishes panning at the bottom side of the image.

To make the panning always end at the very top or bottom edge of the image, specify a very large value (such as -1000 or 1000).

The default value is 0.

endZoomproperty 
public var endZoom:Number

The ending zoom factor of the effect, with 1 being normal size. This represents the value by which the image will be magnified when the effect ends.

The default value is 1.2.

startXproperty 
public var startX:Number

The starting x-position of the effect.

A negative number equates to an effect which starts panning from the left side of the image; a positive number equates to an effect which starts panning from the right side of the image.

To make the panning always start at the very left or right edge of the image, specify a very large value (such as -1000 or 1000).

The default value is 0.

startYproperty 
public var startY:Number

The starting y-position of the effect.

A negative number equates to an effect which starts panning from the top side of the image; a positive number equates to an effect which starts panning from the bottom side of the image.

To make the panning always start at the very top or bottom edge of the image, specify a very large value (such as -1000 or 1000).

The default value is 0.

startZoomproperty 
public var startZoom:Number

The starting zoom factor of the effect, with 1 being normal size. This represents the value by which the image will initially be magnified.

The default value is 1.2.

Constructor detail
KBEffect()constructor
public function KBEffect(startX:Number = 0, startY:Number = 0, startZoom:Number = 1.2, endX:Number = 0, endY:Number = 0, endZoom:Number = 1, delay:Number = 500, duration:Number = 5000, easing:Function = null)Parameters
startX:Number (default = 0)
 
startY:Number (default = 0)
 
startZoom:Number (default = 1.2)
 
endX:Number (default = 0)
 
endY:Number (default = 0)
 
endZoom:Number (default = 1)
 
delay:Number (default = 500)
 
duration:Number (default = 5000)
 
easing:Function (default = null)