Carousel > API

Properties

Property Type Default Description
xmlPath String "" (Empty String) The location of the XML file.

Example:
myCarousel.xmlPath = "files/xml/images.xml";
items Array [] An array of objects, each object containing the source of the content and other additional data.

Example:
myCarousel.items = [{source:"images/img0.jpg"}, {source:"images/img1.jpg"}, {source:"images/img2.jpg"}];
itemsArray Array [] An array of strings, each string containing the source of the content.

Example:
myCarousel.itemsArray = ["images/img0.jpg", "files/img1.jpg", "images/img2.jpg"];
itemWidth Number 150 The maximum width of each item.

Example:
myCarousel.itemWidth = 200;
itemHeight Number 100 The maximum height of each item.

Example:
myCarousel.itemHeight = 70;
scaleMode String "exactFit" The scaling of each item. "exactFit" will resize all items to the maximum width and height. "maintainAspectRatio" will resize the items to the maximum width or height, maintaining the aspect ratio.

Example:
myCarousel.scaleMode = "maintainAspectRatio";
currentPosition Number 0 A number between 0 and 1 representing the current position of the carousel.

Example:
myCarousel.currentPosition = 0.5;
currentPositionStrength Number 50 Indicates the strength of the easing when the position of the carousel is set using the currentPosition property.

Example:
myCarousel.currentPositionStrength = 50;
direction String "horizontal" The direction of the carousel.

Example:
myCarousel.direction = "vertical";
view String "3D" The type of view. If "2D" is selected all the items will face towards the front.

Example:
myCarousel.view = "3D";
layers uint 1 The number of layers represents the number of rows when direction is set to "horizontal" or the number of columns when direction is set to "vertical".

Example:
myCarousel.layers = 4;
verticalAlign String "middle" The vertical alignment of each item when the direction is set to "horizontal".

Example:
myCarousel.verticalAlign = "bottom";
horizontalAlign String "center" The horizontal alignment of each item when the direction is set to "vertical".

Example:
myCarousel.horizontalAlign = "left";
layerDistance Number 10 The distance between layers.

Example:
myCarousel.layerDistance = 25;
radius Number 270 The radius of the carousel.

Example:
myCarousel.radius = 300;
cornerRoundness Number 0 The amount by which the corners of the items will be rounded.

Example:
myCarousel.cornerRoundness = 50;
overSkinReference String "" The name of a Class associated to a library symbol that will be displayed on top of each item. This property can be used to create a gloss effect or to add a watermark.

Example:
myCarousel.overSkinReference = "GlossEffect";
handCursor Boolean false Indicates whether a hand cursor will be displayed when the mouse rolls over an item.

Example:
myCarousel.handCursor = true;
smoothing Boolean true Indicates whether the images will be smoothened.

Example:
myCarousel.smoothing = false;
interactiveItems Boolean false Indicates whether the items will be interactive. Set this property to true if the items contain objects that need to respond to mouse interaction.

Example:
myCarousel.interactiveItems = true;
border Boolean false Indicates whether a border will be added for each item.

Example:
myCarousel.border = true;
borderColor uint 0xFFFFFF The color of the border.

Example:
myCarousel.borderColor = 0xFF00FF;
borderAlpha Number 1.0 The alpha of the border.

Example:
myCarousel.borderAlpha = 0.5;
borderThickness Number 5 The thickness of the border.

Example:
myCarousel.borderThickness = 0xFF00FF;
preloaderType String "bar" The type of preloader. Values: "bar", "pie", "circular1", "circular2", "circular3" and "none".

Example:
myCarousel.preloaderType = "circular2";
preloaderSize Number 100 The width of the preloader if preloaderType is set to "bar" and the radius of the preloader if preloaderType is set to "pie", "circular1", "circular2" or "circular3".

Example:
myCarousel.preloaderSize =15;
preloaderFillAlpha Number 0.5 The alpha of the preloader's fill portion.

Example:
myCarousel.preloaderFillAlpha = 0.7;
preloaderLineAlpha Number 1.0 The alpha of the preloader's line portion.

Example:
myCarousel.preloaderLineAlpha = 0.2;
preloaderFillColor uint 0xFFFFFF The color of the preloader's fill portion.

Example:
myCarousel.preloaderFillColor = 0x0000FF;
preloaderLineColor uint 0xFFFFFF The color of the preloader's line portion.

Example:
myCarousel.preloaderLineColor = 0xFF0000;
zoomItemPreloaderType String "circular1" The type of preloader. Values:"circular1", "circular2", "circular3" and "none".

Example:
myCarousel.zoomItemPreloaderType = "circular2";
zoomItemPreloaderSize Number 200 The radius of the preloader.

Example:
myCarousel.zoomItemPreloaderSize =15;
zoomItemPreloaderColor uint 0xFFFFFF The color of the preloader.

Example:
myCarousel.zoomItemPreloaderColor = 0x000000;
reflection Boolean false Indicates whether a reflection will be added for the scroller.

Example:
myCarousel.reflection = true;
reflectionDistance Number 0 The distance of the reflection from the bottom edge of the item.

Example:
myCarousel.reflectionDistance = 5;
reflectionAlpha Array [0.7, 0] An array of two numbers representing the alpha values at the beginning and at the end of the reflection.

Example:
myCarousel.reflectionAlpha = [1.0, 0.0];
reflectionRatio Array [0, 127] An array of two numbers containing the ratio values of the reflection.

Example:
myCarousel.reflectionRatio = [0, 255];
quality uint 2 A number representing the quality of the perspective view for the items. Setting this property to higher values will decrease the performance.

Example:
myCarousel.quality = 1;
doubleSided Boolean true Indicates whether the items are double-sided. If false, the items will be displayed only when they are in front. Setting this property to true will result in better performance.

Example:
myCarousel.doubleSided = true;
cameraZoom Number 70 A number representing the zoom value of the 3D Camera.

Example:
myCarousel.cameraZoom = 35;
cameraFocus Number 10 A number representing the focus value of the 3D Camera.

Example:
myCarousel.cameraFocus = 15;
cameraDepth Number -700 A number representing the position, on the Z axis, of the 3D Camera.

Example:
myCarousel.cameraZ = -800;
cameraPosition String "outside" Indicates whether the camera will be positioned inside or outside the carousel. If it is set to "inside" the cameraDepth property will be overridden to 0 and the carousel will have the aspect of a semi carousel.

Example:
myCarousel.cameraZ = -800;
yRotation Number 0 A number representing the rotation, on the Y axis, of the carousel.

Example:
myCarousel.yRotation = 200;
xRotation Number 0 A number representing the rotation, on the X axis, of the carousel.

Example:
myCarousel.xRotation = 100;
temporaryClipReference Object null The name of a Class associated to a library symbol that will be displayed for each item until the content of the item is loaded. If no value is specified, automatically a rectangle will be used with a specified alpha and color. If you don't want a temporary clip to be displayed at all, simply set the temporaryClipAlpha property to 0.

Example:
myCarousel.temporaryClipReference = "TempClip";
temporaryClipAlpha Number 0.5 The alpha of the temporary clip. This property will be ignored if a reference to a temporary clip is set.

Example:
myCarousel.temporaryClipAlpha = 1.0;
temporaryClipColor uint 0xCCCCCC The color of the temporary clip. This property will be ignored if a reference to a temporary clip is set.

Example:
myCarousel.temporaryClipColor = 0x000000;
skipBrokenPath Boolean false Indicates whether the component will ignore invalid sources when external content is loaded.

Example:
myCarousel.skipBrokenPath = true;
mouseScroll Boolean false Indicates whether the component's items will be scrolled when the mouse rolls over the component.

Example:
myCarousel.mouseScroll = true;
mouseScrollSpeed Number 5 The speed of the scrolling when mouseScroll is set to true. A higher value indicates a higher speed.

Example:
myCarousel.mouseScrollSpeed = 30;
mouseScrollReversed Boolean false Indicates whether the items are scrolling in reversed direction relative to the mouse movement.

Example:
myCarousel.mouseScrollReversed = true;
dragScroll Boolean false Indicates whether scrolling the component's items by mouse dragging is activated.

Example:
myCarousel.dragScroll = true;
dragScrollSpeed Number 30 The speed of the scrolling when dragScroll is set to true. A higher value indicates a higher speed.

Example:
myCarousel.dragScrollSpeed = 70;
dragScrollEasingStrength Number 30 The strength of the easing when dragScroll is set to true. A lower value indicates a stronger easing.

Example:
myCarousel.dragScrollEasingStrength = 70;
dragScrollReversed Boolean false Indicates whether the items are scrolling in reversed direction relative to the mouse movement.

Example:
myCarousel.dragScrollReversed = true;
angleToScroll Number 30 The angle of scrolling when scrollCW() or scrollCCW() methods are used.

Example:
myCarousel.angleToScroll = 90;
scrollDuration Number 1 The scroll duration in seconds.

Example:
myCarousel.scrollDuration = 3;
scrollEasing String "exponentialOut" The scroll easing.

Example:
myCarousel.scrollEasing = "backOut";
zoomDuration Number 1 The zoom duration in seconds.

Example:
myCarousel.zoomDuration = 3;
zoomEasing String "exponentialOut" The zoom easing.

Example:
myCarousel.zoomEasing = "backOut";
autoScroll Boolean false Indicates whether the component's items will be scrolled automatically.

Example:
myCarousel.autoScroll = true;
autoScrollDelay Number 3 Indicates the delay of the auto scroll, in seconds.

Example:
myCarousel.autoScrollDelay = 4;
autoScrollDirection String "next" Indicates the direction in which the items will be scrolled.

Example:
myCarousel.autoScrollDirection = "previous";
zoomAutoScroll Boolean false Indicates whether the component's items will be zoomed automatically.

Example:
myCarousel.autoZoom = true;
zoomAutoScrollDelay Number 3 Indicates the delay of the auto zoom, in seconds.

Example:
myCarousel.autoZoomDelay = 4;
zoomAutoScrollDirection String "next" Indicates whether the next item or the previous item will be zoomed.

Example:
myCarousel.autoZoomDirection = "previous";
zoomItemScale Number 3 Indicates how much the items will be scaled when zooming is used.

Example:
myCarousel.zoomItemScale = 2;
useSmoothing Boolean false Indicates whether the images will be smoothened during the scrolling process. Leave this property to false for a smoother scrolling. When scrolling is complete, the images will automatically be smoothened.

Example:
myCarousel.useSmoothing = true;
usePrecision Boolean true Indicates whether the 3D perspective of the images will be precise during the scrolling process. Set this property to false for a smoother scrolling. If set to false, the images will look a little distorted. When the scrolling is complete, the 3D perspective will automatically become precise.

Example:
myCarousel.usePrecision = false;
selectOver uint 1 Indicates over how many items the scrolling will be executed when selectNext() and selectPrevious() methods are used.

Example:
myCarousel.selectOver = 3;
zoomOver uint 1 Indicates over how many items the zooming will be executed when zoomNext() and zoomPrevious() methods are used.

Example:
myCarousel.zoomOver = 2;
effect Object null An instance of an Effect component.

Example:
var greyEffect:GreyEffect = new GreyEffect();
myCarousel.effect = greyEffect; or myCarousel.effect = "greyEffect";
videoPlayer Object null An instance of a Carousel Video Player component.

Example:
var vp:CarouselVideoPlayer = new CarouselVideoPlayer ();
myCarousel.videoPlayer = vp;
livePreviewItems uint 10 The number of items used for the live preview.

Read-only Properties

Property Type Description
numItems uint Returns the total number of items.

Example:
trace(myCarousel.numItems);
selectedIndex int Returns the index of the selected item.

Example:
trace(myCarousel.selectedIndex);
zoomIndex int Returns the index of the zoomed item.

Example:
trace(myCarousel.zoomIndex);
zoomState String Returns "in" if the items are zoomed in. Else it returns "out".

Example:
trace(myCarousel.zoomState);
isScrolling Boolean Indicates whether the component is currently scrolling.

Example:
trace(myCarousel.isScrolling);
camera Camera3D A reference to the instance of the Camera3D class. Using this reference to the Camera3D instance you can manipulate the position of the camera, zoom, focus and other properties.

Example:
myCarousel.camera.zoom = 100;
myCarousel.camera.focus = 30;

Methods

Method Implementation Description
addItem() addItem(data:Object):void Adds a new item at the end of the component.

Example:
myCarousel.addItem({source:"images/image1.jpg", title:"Flower", description:"Image description"});
addItemAt() addItemAt(data:Object, index:uint):void Adds a new item at the specified index.

Example:
myCarousel.addItemAt({source:"images/image1.jpg", title:"Flower", description:"Image description"}, 3);
addItems() addItems(items:Array):void Adds an array of items to the end of the component.

Example:
var myItems:Array = [{source:"images/image0.jpg"}, {source:"images/image1.jpg",title:"Bird"}, {source:"images/image2.jpg",title:"Sky"}, {source:"images/image3.jpg"}]; myCarousel.addItems(myItems);
addItemsAt() addItems(items:Array, index:uint):void Adds an array of items at the specified index.

Example:
var myItems:Array = [{source:"images/image0.jpg"}, {source:"images/image1.jpg",title:"Bird"}, {source:"images/image2.jpg",title:"Sky"}, {source:"images/image3.jpg"}]; myCarousel.addItems(myItems, 5);
removeItem() removeItem(item:IDisplayItem):void Removes the specified item.

Example:
myCarousel.removeItem(myCarousel.getItemAt(4));
removeItemAt() removeItemAt(index:uint):void Removes the item at the specified index.

Example:
myCarousel.removeItemAt(1);
removeItemsAt() removeItemsAt(startIndex:uint, removeCount:uint) Removes a specified number of items starting at a specified index.

Example:
myCarousel.removeItemsAt(0, 3);
removeAllItems() removeAllItems():void Removes all items.

Example:
myCarousel.removeAllItems();
replaceItem() replaceItem(data:Object, item:IDisplayItem) Replace an existing item with a new item.

Example:
var data:Object = {source:"images/image1.jpg", desc:"Bird"}; myCarousel.replaceItem(data, myCarousel.getItemAt(5));
replaceItemAt() replaceItemAt(data:Object, index:uint) Replace an existing item at a specified index with a new item.

Example:
var data:Object = {source:"images/image1.jpg", desc:"Bird"}; myCarousel.replaceItem(data, 2);
spliceItems() spliceItems(startIndex:uint, removeCount:uint, items:Array = null):void Removes a specified number of items, starting at a specified index and adds an array of items at the specified index.

Example:
var newItems:Array = [{source:"images/image0.jpg"}, {source:"images/image1.jpg",title:"Bird"}, {source:"images/image2.jpg",title:"Sky"}, {source:"images/image3.jpg"}]; myCarousel.spliceItems(0, 3, newItems);
getItemAt() getItemAt(index:uint):IDisplayItem Returns the item at the specified index.

Example:
trace(myCarousel.getItemAt(2).index);// output 2
getItemIndex() getItemIndex(item:IDisplayItem):int Returns the index of the specified item.

Example:
var nr:int = myCarousel.getItemIndex(myCarousel.getItemAt(7)); trace(nr); // output 7
select() select(index:uint):void Selects the item at the specified index.

Example:
myCarousel.select(5);
deselect() deselect(index:uint):void Deselects the item at the specified index.

Example:
myCarousel.deselect(myCarousel.selectedIndex);
selectNext() selectNext():void Selects the next item.

Example:
myCarousel.selectNext();
selectPrevious() selectPrevious():void Selects the previous item.

Example:
myCarousel.selectPrevious();
zoom() zoom(index:uint):void Zooms to the item at the specified index.

Example:
myCarousel.zoom(5);
zoomOut() zoomOut():void Zooms out the carousel.

Example:
myCarousel.zoomOut();
zoomNext() zoomNext():void Zooms to the next item.

Example:
myCarousel.zoomNext();
zoomPrevious() zoomPrevious():void Zooms to the previous item.

Example:
myCarousel.zoomPrevious();
scrollCW() scrollCW():void Scrolls the carousel clockwise by a certain angle, given by the angleToScroll property.

Example:
myCarousel.scrollCW();
scrollCCW() scrollCCW():void Scrolls the carousel counter-clockwise by a certain angle, given by the angleToScroll property.

Example:
myCarousel.scrollCCW();
setSize() setSize(width:Number, height:Number):void Sets the component's size at the specified width and height.

Example:
myCarousel.setSize(700, 500);
move() move(x:Number, y:Number):void Moves the component at the specified position.

Example:
myCarousel.move(100, 100);

Events

Event type Description
ITEMS_LOAD_START Dispatched when the loading of a group of items begins.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEMS_LOAD_START, eventHandler)

function eventHandler(event:CarouselEvent):void
{
trace("loading begins");
}
ITEMS_LOAD_PROGRESS Dispatched every time an items was loaded, during the loading of a group of items.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEMS_LOAD_PROGRESS,eventHandler)

function eventHandler(event:CarouselEvent):void
{
trace("Loaded " + event.itemsLoaded + " out of " + event.itemsTotal);
}
ITEMS_LOAD_COMPLETE Dispatched when the loading of a group of items is complete.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEMS_LOAD_COMPLETE,eventHandler)

function eventHandler(event:CarouselEvent):void
{
trace("loading complete");
}
XML_LOAD_START Dispatched when the loading of the XML file begins.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.XML_LOAD_START, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("XML loading begins");
}
XML_LOAD_PROGRESS Dispatched during the loading of the XML file.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.XML_LOAD_PROGRESS, eventHandler);
function eventHandler(event:CarouselEvent):void
{
trace("Loaded " + event.bytesLoaded + " out of " + event.bytesTotal);
}
XML_LOAD_COMPLETE Dispatched when the loading of an XML file is complete.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.XML_LOAD_COMPLETE,eventHandler)
function eventHandler(event:CarouselEvent):void
{
trace("XML file loaded");
}
ITEM_ADD Dispatched when a new item was added.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_ADD, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace(event.index); // output 3
trace(event.data); // output ,source:"images/image1.jpg", title:"Flower", desc:"Sun flower"
trace(event.data.title); // output "Flower"
}

myCarousel.addItemAt({source:"images/image1.jpg", title:"Flower", desc:"Sun flower"}, 3);
ITEM_REMOVE Dispatched when an item was removed.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_REMOVE, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace(event.index); // output 1
}

myCarousel.removeItemAt(1);
ITEM_CLICK Dispatched when an item was clicked.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_CLICK, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ITEM_DOUBLE_CLICK Dispatched when an item was double-clicked.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_DOUBLE_CLICK, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace(event.data);
}
ITEM_MOUSE_UP Dispatched when the mouse is released over an item.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_MOUSE_UP, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ITEM_MOUSE_DOWN Dispatched when the mouse is pressed over an item.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_MOUSE_DOWN, eventHandler);
function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ITEM_MOUSE_OVER Dispatched when the mouse pointer is moved over an item.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_MOUSE_OVER, eventHandler);
function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ITEM_MOUSE_OUT Dispatched when the mouse pointer is moved away from an item.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_MOUSE_OUT, eventHandler);
function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ITEM_START Dispatched when the content of an item begins to load.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_START, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Item at index: " + event.index + " has started loading");
}
ITEM_PROGRESS Dispatched during the loading of an item's content.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_PROGRESS, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Loaded " + event.bytesLoaded + " out of " +event.bytesTotal);
}
ITEM_COMPLETE Dispatched when the content of an item is completely loaded.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_COMPLETE, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Item at index: " + event.index + " has finished loading");
}
ITEM_ERROR Dispatched when an error has occurred during the loading process.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_ERROR, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Item at index: " + event.index + " could not be loaded");
}
ITEM_SELECTED Dispatched when an item was selected.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_SELECTED, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Index of the selected item: " + event.index);
}
ITEM_DESELECTED Dispatched when an item was deselected.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ITEM_DESELECTED, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Index of the deselected item: " + event.index);
}
ZOOM_ITEM_CLICK Dispatched when an item was clicked.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_CLICK, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ZOOM_ITEM_DOUBLE_CLICK Dispatched when an item was double-clicked.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_DOUBLE_CLICK, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace(event.data);
}
ZOOM_ITEM_MOUSE_UP Dispatched when the mouse is released over an item.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_MOUSE_UP, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ZOOM_ITEM_MOUSE_DOWN Dispatched when the mouse is pressed over an item.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_MOUSE_DOWN, eventHandler);
function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ZOOM_ITEM_MOUSE_OVER Dispatched when the mouse pointer is moved over an item.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_MOUSE_OVER, eventHandler);
function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ZOOM_ITEM_MOUSE_OUT Dispatched when the mouse pointer is moved away from an item.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_MOUSE_OUT, eventHandler);
function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
ZOOM_ITEM_START Dispatched when the content of an item begins to load.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_START, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Item at index: " + event.index + " has started loading");
}
ZOOM_ITEM_PROGRESS Dispatched during the loading of an item's content.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_PROGRESS, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Loaded " + event.bytesLoaded + " out of " +event.bytesTotal);
}
ZOOM_ITEM_COMPLETE Dispatched when the content of an item is completely loaded.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_COMPLETE, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Item at index: " + event.index + " has finished loading");
}
ZOOM_ITEM_ERROR Dispatched when an error has occurred during the loading process.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_ITEM_ERROR, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Item at index: " + event.index + " could not be loaded");
}
UPDATE Dispatched after the component was updated because a property changed or an item was added or removed.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.UPDATE, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("Something changed!");
}
SCROLL_START Dispatched when the scrolling starts.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.SCROLL_START, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("scroll started");
}
SCROLL_PROGRESS Dispatched during the scrolling process.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.SCROLL_PROGRESS, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("is scrolling");
}
SCROLL_COMPLETE Dispatched when the scrolling is finished.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.SCROLL_COMPLETE, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("scroll complete");
}
ZOOM_START Dispatched when the zooming starts.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_START, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("zoom started");
}
ZOOM_PROGRESS Dispatched during the zooming process.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_PROGRESS, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("is zooming");
}
ZOOM_COMPLETE Dispatched when the zooming is finished.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_COMPLETE, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("zoom complete");
}
ZOOM_OUT_START Dispatched when the zooming out starts.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_OUT_START, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("zoom out started");
}
ZOOM_OUT_PROGRESS Dispatched during the zooming out process.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_OUT_PROGRESS, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("is zooming out");
}
ZOOM_OUT_COMPLETE Dispatched when the zooming out is finished.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.ZOOM_OUT_COMPLETE, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("zoom out complete");
}
DISPLAY_ZOOM_ITEM Dispatched when the zoomed item is displayed.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.DISPLAY_ZOOM_ITEM, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace(event.index);
}
OUTSIDE_CLICK Dispatched when the user clicks outside the component's items.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.OUTSIDE_CLICK, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("outside click");
}
OUTSIDE_DOUBLE_CLICK Dispatched when the user double-clicks outside the component's items.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.OUTSIDE_DOUBLE_CLICK, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("outside double click");
}
OUTSIDE_MOUSE_DOWN Dispatched when the mouse is released outside the component's items.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.OUTSIDE_MOUSE_DOWN, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("outside mouse down");
}
OUTSIDE_MOUSE_UP Dispatched when the mouse is pressed outside the component's items.

Example:

import com.flashotaku.events.CarouselEvent;

myCarousel.addEventListener(CarouselEvent.OUTSIDE_MOUSE_UP, eventHandler);

function eventHandler(event:CarouselEvent):void
{
trace("outside mouse up");
}

Carousel Video Player

Properties

Property Type Default Description
scaleMode String "exactFit" The scaling of the video. "exactFit" will resize the video to the maximum width and height. "maintainAspectRatio" will resize the video to the maximum width or height, maintaining the aspect ratio. "noScale" will ignore the maximum width and height, maintaining the video at the original dimensions.

Example:
myCarouselVideoPlayer.scaleMode = "maintainAspectRatio";
autoPlay Boolean false Indicates whether the video will play imediatelly after the transition of the slide is complete.

Example:
myCarouselVideoPlayer.autoPlay = true;
autoReplay Boolean false Indicates whether the video will be replayed after reaching the end.

Example:
myCarouselVideoPlayer.autoReplay = true;
fadeControls Boolean true Indicates whether the player controls will fade out.

Example:
myCarouselVideoPlayer.fadeControls = true;
fadeInDuration Number 0.5 The duration of the fade in.

Example:
myCarouselVideoPlayer.fadeInDuration = 1;
fadeOutDuration Number 1 The duration of the fade out.

Example:
myCarouselVideoPlayer.fadeOutDuration = 2;
fadeOutDelay Number 1 The delay of the fade out.

Example:
myCarouselVideoPlayer.fadeOutDelay = 2;
initialFadeOutDelay Number 3 The delay of the initial fade out.

Example:
myCarouselVideoPlayer.initialFadeOutDelay = 2;
playButtonAlpha Number 0.8 The alpha of the initial play button.

Example:
myCarouselVideoPlayer.playButtonAlpha = 0.3;
smoothing Boolean false Indicates whether the videos will be smoothened.

Example:
myCarouselVideoPlayer.smoothing = true;
marginBottom Number 10 The bottom margin of the player controls.

Example:
myCarouselVideoPlayer.marginBottom = 20;
marginLeft Number 10 The left margin of the player controls.

Example:
myCarouselVideoPlayer.marginLeft = 20;
marginBottom Number 10 The right margin of the player controls.

Example:
myCarouselVideoPlayer.marginRight = 20;
reflection Boolean false Indicates whether video reflection will be displayed.

Example:
myCarouselVideoPlayer.reflection = true;
reflectionAlpha Array [0.7, 0] An array indicating the transparency of the reflection at its top and at its bottom.

Example:
myCarouselVideoPlayer.reflectionAlpha = [1, 0];
reflectionRatio Array [0, 127] An array indicating the ratio of the reflection.

Example:
myCarouselVideoPlayer.reflectionRatio = [0, 255];
volume Number 0.5 A number between 0 and 1 representing the volume of the video.

Example:
myCarouselVideoPlayer.volume = 0.4;

Read-only Properties

Property Type Description
duration Number Returns the duration of the video, in seconds.

Example:
trace(myCarouselVideoPlayer.duration);
time Number Returns the current time of the video, in seconds.

Example:
trace(myCarouselVideoPlayer.time);

Methods

Method Implementation Description
resume() resume():void Resumes the currently playing video.

Example:
myCarouselVideoPlayer.resume();
stop() stop():void Stops the currently playing video.

Example:
myCarouselVideoPlayer.stop();
pause() pause():void Pauses the currently playing video.

Example:
myCarouselVideoPlayer.pause();
seek() seek(value:Number):void Seeks the currently playing video to the specified time value.

Example:
myCarouselVideoPlayer.seek(100);
close() close():void Closes the currently playing video.

Example:
myCarouselVideoPlayer.close();

Events

Event type Description
VIDEO_CLICK Dispatched when a video was clicked.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.VIDEO_CLICK, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
VIDEO_DOUBLE_CLICK Dispatched when a video was double-clicked.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.VIDEO_DOUBLE_CLICK, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
VIDEO_MOUSE_UP Dispatched when the mouse is released over a video.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.VIDEO_MOUSE_UP, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
VIDEO_MOUSE_DOWN Dispatched when the mouse is pressed over a video.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.VIDEO_MOUSE_DOWN, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
VIDEO_MOUSE_UP Dispatched when the mouse is released over a video.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.VIDEO_MOUSE_DOWN, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
VIDEO_MOUSE_OVER Dispatched when the mouse pointer is moved over a video.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.VIDEO_MOUSE_OVER, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
VIDEO_MOUSE_OUT Dispatched when the mouse pointer is moved away from a video.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.VIDEO_MOUSE_OUT, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
BEGIN Dispatched when the initial play button was clicked.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.BEGIN, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
CLOSE Dispatched when the video player is closed, after the user moved to a new slide or after the close() method was called.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.CLOSE, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
START Dispatched when the playback initially starts to play.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.START, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
STOP Dispatched when the stop button is pressed or when the playback is complete.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.STOP, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
PAUSE Dispatched when the video is paused.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.PAUSE, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
RESUME Dispatched when the playback is resumed.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.RESUME, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}
COMPLETE Dispatched when the playback is complete.

Example:

import com.flashotaku.events.CarouselVideoPlayerEvent;

myCarouselVideoPlayer.addEventListener(CarouselVideoPlayerEvent.COMPLETE, eventHandler);

function eventHandler(event:CarouselVideoPlayerEvent):void
{
trace(event.type);
}