| Package | com.dwuser.ss4.utils |
| Class | public class KBEffect |
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
| Property | Defined 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 | ||
| Method | Defined 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 | ||
| delay | property |
public var delay:NumberSpecifies the delay, in milliseconds, before the effect begins to play once an image has been opened.
The default value is 500.
| duration | property |
public var duration:NumberSpecifies the duration of the effect, in milliseconds.
The default value is 5000.
| easing | property |
public var easing:FunctionSpecifies 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
| endX | property |
public var endX:NumberThe 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.
| endY | property |
public var endY:NumberThe 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.
| endZoom | property |
public var endZoom:NumberThe 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.
| startX | property |
public var startX:NumberThe 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.
| startY | property |
public var startY:NumberThe 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.
| startZoom | property |
public var startZoom:NumberThe 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.
| 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) |