Actionscript 2 reference

 

Events

onAddPhoto
onAutoFlip
onDoubleClick
onInitPhotoFlow
onLoadPhoto
onLoadPhotosComplete
onLoadProgress
onLoadSet
onMouseOver
onMouseOut
onRemovePhoto
onSelectPhoto
onStartLoadPhoto

 

Methods

addPhoto
flipBack
flipNext
getObjectAt
getSelectedIndex
getSelectedObject
getTotal
loadXML
removeAll
removePhoto
setSelection
setSize
sortByName
startAutoFlip
stopAutoFlip

 

Properties

allLoaded
autoFlip

defaultId
embedFont
flipSound
flipSpeed
folderPath
mouseWheelFlip
nameBold
nameColor
nameDistance
nameFont
namePosition
nameSize
photoHeight
photosData
photoWidth
preloadSet
reflectionAlpha
reflectionDepth
reflectionDistance
reflectionExtend
scaleMode
selectedScale
selectedReflectionAlpha
selectedY
showName
showReflection
spacing
zoom
zoomType

 

Events

onAddPhoto

Availability

Flash Player 8

Description

Event; called when an image is added.

Example

var eventListener:Object = new Object();
eventListener.onAddPhoto = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onAddPhoto", eventListener);

 

 

onAutoFlip

Availability

Flash Player 8

Description

Event; called when an image is auto-flipped.

Example

var eventListener:Object = new Object();
eventListener.onAutoFlip = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onAutoFlip", eventListener);

 

 

onDoubleClick

Availability

Flash Player 8

Description

Event; called when an image is double-clicked.

Example

var eventListener:Object = new Object();
eventListener.onDoubleClick = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onDoubleClick", eventListener);

 

 

onInitPhotoFlow

Availability

Flash Player 8

Description

Event; called when the component initializes.

Example

var eventListener:Object = new Object();
eventListener.onInitPhotoFlow = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onInitPhotoFlow", eventListener);

 

 

onLoadPhoto

Availability

Flash Player 8

Description

Event; Called when an image is loaded.

Example

var eventListener:Object = new Object();
eventListener.onLoadPhoto = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onLoadPhoto", eventListener);

 

 

onLoadPhotosComplete

Availability

Flash Player 8

Description

Event; called when all photos have finished loading.

Example

var eventListener:Object = new Object();
eventListener.onLoadPhotosComplete = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onLoadPhotosComplete", eventListener);

 

 

onLoadProgress

Availability

Flash Player 8

Description

Event; called when the status of the load progress changes.

Example

var eventListener:Object = new Object();
eventListener.onLoadProgress = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onLoadProgress", eventListener);

 

 

onLoadSet

Availability

Flash Player 8

Description

Event; called when the images set to preload have loaded.

Example

var eventListener:Object = new Object();
eventListener.onLoadSet = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onLoadSet", eventListener);

 

 

onMouseOver

Availability

Flash Player 8

Description

Event; called when mouse rolled over an image.

Example

var eventListener:Object = new Object();
eventListener.onMouseOver = function(evt){
		trace(evt.name);
}
myPhotoFlow.addEventListener("onMouseOver", eventListener);

 

 

onMouseOut

Availability

Flash Player 8

Description

Event; called when mouse is rolled off an image.

Example

var eventListener:Object = new Object();
eventListener.onMouseOut = function(evt){
		trace(evt.name);
}
myPhotoFlow.addEventListener("onMouseOut", eventListener);

 

 

onRemovePhoto

Availability

Flash Player 8

Description

Event; called when an image is removed.

Example

var eventListener:Object = new Object();
eventListener.onRemovePhoto = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onRemovePhoto", eventListener);

 

 

onSelectPhoto

Availability

Flash Player 8

Description

Event; called when an image is selected or becomes the current image.

Example

var eventListener:Object = new Object();
eventListener.onSelectPhoto = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onSelectPhoto", eventListener);

 

 

onStartLoadPhoto

Availability

Flash Player 8

Description

Event; called when an image starts loading.

Example

var eventListener:Object = new Object();
eventListener.onStartLoadPhoto = function(eventObject:Object){
	// extra code goes here
}
myPhotoFlow.addEventListener("onStartLoadPhoto", eventListener);

 

 

Methods

addPhoto

Availability

Flash Player 8

Description

Method; adds a photo to the component.

Example

myPhotoFlow.addPhoto({name:"image", desc:"an image", url:"image.jpg"}, 1);

 

 

flipBack

Availability

Flash Player 8

Description

Method; moves back one photo in the series.

Example

myPhotoFlow.flipBack();

 

 

flipNext

Availability

Flash Player 8

Description

Method; move forward one photo in the series.

Example

myPhotoFlow.flipNext();

 

 

getObjectAt

Availability

Flash Player 8

Description

Method; returns the object at the specified index.

Example

var firstImage:String = myPhotoFlow.getObjectAt(0).url;

 

 

getSelectedIndex

Availability

Flash Player 8

Description

Method; returns the index number of the currently selected photo.

Example

var currentImage:Number = myPhotoFlow.getSelectedIndex();

 

 

getSelectedObject

Availability

Flash Player 8

Description

Method; returns the object associated with the currently selected photo.

Example

var currentImage:String = myPhotoFlow.getSelectedObject().url;

 

 

getTotal

Availability

Flash Player 8

Description

Method; returns the total number of images.

Example

var totalNumberOfPhotos:Number = myPhotoFlow.getTotal();

 

 

loadXML

Availability

Flash Player 8

Description

Method; loads the specified XML file.

Example

myPhotoFlow.loadXML("source.xml");

 

 

removeAll

Availability

Flash Player 8

Description

Method; removes all photos from the component.

Example

myPhotoFlow.removeAll();

 

 

removePhoto

Availability

Flash Player 8

Description

Method; removes the specified photo from the series.

Example

myPhotoFlow.removePhoto(0);

 

 

setSelection

Availability

Flash Player 8

Description

Method; selects the specified photo.

Example

myPhotoFlow.setSelection(1);

 

 

setSize

Availability

Flash Player 8

Description

Method; sets the width and height of the component.

Example

var newWidth:Number = 200;
var newHeight:Number = 300;
myPhotoFlow.setSize(newWidth, newHeight);

 

 

sortByName

Availability

Flash Player 8

Description

Method; sorts the series alphabetically based on photo names.

Example

myPhotoFlow.sortByName();

 

 

startAutoFlip

Availability

Flash Player 8

Description

Method; begins auto-flipping the photos.

Example

myPhotoFlow.startAutoFlip();

 

 

stopAutoFlip

Availability

Flash Player 8

Description

Method; stops the auto-flipping of photos.

Example

myPhotoFlow.stopAutoFlip();

 

 

Properties

allLoaded

Availability

Flash Player 8

Description

Property; boolean value indicatin whether all of the images have loaded or not

Example

trace(myPhotoFlow.allLoaded);

 

autoFlip

Availability

Flash Player 8

Description

Property; specifies whether to flip the photos automatically.

Example

myPhotoFlow.autoFlip = true;

 

 

defaultId

Availability

Flash Player 8

Description

Property; the index of the default photo.

Example

myPhotoFlow.defaultId = 2;

 

 

embedFont

Availability

Flash Player 8

Description

Property; specifies whether to use an embedded font (true) or not (false).

Example

myPhotoFlow.embedFont = true;

 

 

flipSound

Availability

Flash Player 8

Description

Property; the linkage identifier of a sound file in the library to be played when a photo flips.

Example

myPhotoFlow.flipSound = "mySound";

 

 

flipSpeed

Availability

Flash Player 8

Description

Property; the speed photos should be flipped at (the lower the value, the higher the speed).

Example

myPhotoFlow.flipSpeed = 3;

 

 

folderPath

Availability

Flash Player 8

Description

Property; the path to the folder containing external images.

Example

myPhotoFlow.folderPath = "images/";

 

 

mouseWheelFlip

Availability

Flash Player 8

Description

Property; specifies whether to flip photos using the mouse wheel action.

Example

myPhotoFlow.mouseWheelFlip = true;

 

 

nameBold

Availability

Flash Player 8

Description

Property; Determines whether to format the name as bold (true) or not (false).

Example

myPhotoFlow.nameBold = false;

 

 

nameColor

Availability

Flash Player 8

Description

Property; The color of the photos' name.

Example

myPhotoFlow.nameColor = 0xFF00FF;

 

 

nameDistance

Availability

Flash Player 8

Description

Property; the name's distance from the photo.

Example

myPhotoFlow.nameDistance = 0;

 

 

nameFont

Availability

Flash Player 8

Description

Property; the font to be used for the name.

Example

myPhotoFlow.nameFont = "Arial";

 

 

namePosition

Availability

Flash Player 8

Description

Property; the position of the name in relation to the photo. Options are "top left", "top right", "top center", "bottom left", "bottom right" and "bottom center".

Example

myPhotoFlow.namePosition = "top left";

 

 

nameSize

Availability

Flash Player 8

Description

Property; the font size of the name;

Example

myPhotoFlow.nameSize = 24;

 

 

photoHeight

Availability

Flash Player 8

Description

Property; the height of the photos.

Example

myPhotoFlow.photoHeight = 400;

 

 

photosData

Availability

Flash Player 8

Description

Property; an array containing each photo's object data.

Example

for(var i:Number = 0; i<myPhotoFlow.getTotal(); i++){
trace(myPhotoFlow.photosData[i].url);
}

 

 

photoWidth

Availability

Flash Player 8

Description

Property; the width of the photos.

Example

myPhotoFlow.photoWidth = 400;

 

 

preloadSet

Availability

Flash Player 8

Description

Property; specifies how many images to preload.

Example

myPhotoFlow.preloadSet = 4;

 

 

reflectionAlpha

Availability

Flash Player 8

Description

Property; the alpha value of the reflection.

Example

myPhotoFlow.reflectionAlpha = 15;

 

 

reflectionDepth

Availability

Flash Player 8

Description

Property; the depth of the reflection.

Example

myPhotoFlow.reflectionDepth = 100;

 

 

reflectionDistance

Availability

Flash Player 8

Description

Property; the distance of the reflection from the photo.

Example

myPhotoFlow.reflectionDistance = 50;

 

 

reflectionExtend

Availability

Flash Player 8

Description

Property; the forward extension of the reflection.

Example

myPhotoFlow.reflectionExtend = 100;

 

 

scaleMode

Availability

Flash Player 8

Description

Property; the type of scaling used. Options are "showAll", "scaleToFit" and "noScale".

Example

myPhotoFlow.scaleMode = "showAll";

 

 

selectedScale

Availability

Flash Player 8

Description

Property; the scale of the selected image.

Example

myPhotoFlow.selectedScale = 150;

 

 

selectedReflectionAlpha

Availability

Flash Player 8

Description

Property; the alpha value of the reflection of the selected photo.

Example

myPhotoFlow.selectedReflectionAlpha = 15;

 

 

selectedY

Availability

Flash Player 8

Description

Property; the y position of the currently selected image.

Example

myPhotoFlow.selectedY = -10;

 

 

showName

Availability

Flash Player 8

Description

Property; specifies whether to show the name (true) or not (false).

Example

myPhotoFlow.showName = true;

 

 

showReflection

Availability

Flash Player 8

Description

Property; specifies whether to show a reflection (true) or not (false).

Example

myPhotoFlow.showReflection = true;

 

 

spacing

Availability

Flash Player 8

Description

Property; determines the spacing between images.

Example

myPhotoFlow.spacing = 10;

 

 

zoom

Availability

Flash Player 8

Description

Property; determines the amount of zooming to be applied on mouse over.

Example

myPhotoFlow.zoom = 20;

 

 

zoomType

Availability

Flash Player 8

Description

Property; determines which images should zoom on mouse over. Options are 'none', 'all', 'selected' and 'notSelected'.

Example

myPhotoFlow.zoomType = "all";