Reference for PhotoFlipCS

Method

Description

gotoItem() Move to the item with specified index number.
nextItem() Move to next item.
prevItem() Move to previous item.
load() Load xml source.
addItemAt() Add a new item with specify index.
addItem() Add a new item at the end.
removeItemAt() Remove an item with specify index from PhotoFLIP CS.
removeItem() Remove the last item.

 

PhotoFLIP.gotoItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFLIP.gotoItem(index)

Parameters index: index number of each item. From left to right, 0 to item max.

Returns None

Description Method; Move to the item with specified index.

Code Example :

PhotoFLIP_mc.gotoItem(10);

 

PhotoFLIP.nextItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFLIP.nextItem()

Returns None

Description Method; Move to next item.

Code Example :

PhotoFLIP_mc.nextItem();

 

PhotoFLIP.prevItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFLIP.prevItem()

Returns None

Description Method; Move to previous item.

Code Example :

PhotoFLIP_mc.prevItem();

 

PhotoFLIP.load()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFLIP.setTextFormat(xml)

Parameters

xml: URL of external xml file. Or XML object.

Returns None

Description Method; Load the xml source and setup photoFLIP

Code Example :

//Load the source xml named photo.xml.  
PhotoFLIP_mc.load("photo.xml");

 

PhotoFLIP.addItemAt()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFLIP.addItemAt(object,index)

Parameters object which defined the properties of the item. index: position index which the item add. From left to right, 0 to item max.

Returns None

Description Method; Add a new item with specified index.

Code Example :

//define a item which have linkage name 'p' , type embed bitmap   
var item:Object = {source:"p",width:286,height:354,title:"teset", type:"bitmapasset"};
PhotoFLIP_mc.addItemAt(item,10);

 

PhotoFLIP.addItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFLIP.addItem(item)

Parameters item: object which defined the properties of the item.

Returns None

Description Method; Add a new item at the end.

Code Example :

//define a item which have linkage name 'p' , type embed bitmap   
var item:Object = {source:"p",width:286,height:354,title:"teset", type:"bitmapasset"};
PhotoFLIP_mc.addItem(item);

 

PhotoFLIP.removeItemAt()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFLIP.removeItemAt(index)

Parameters index: position index which the item add. From left to right, 0 to item max.

Returns None

Description Method; Remove an item with specified index.

Code Example :

  PhotoFLIP_mc.removeItemAt(10);

 

PhotoFLIP.removeItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFLIP.removeItem()

Returns None

Description Method; Remove an item from the end.

Code Example :

  PhotoFLIP_mc.removeItem();

Event

Constant

Description

itemClick  ItemEvent.CLICK

Broadcast when mouse clicked on the item.

itemMouseOver  ItemEvent.MOUSE_OVERBroadcast when mouse over on the item.
itemMouseOut   ItemEvent.MOUSE_OUTBroadcast when mouse move outside the item after mouse over.
itemMouseUp   ItemEvent.MOUSE_UPBroadcast when mouse button up after mouse button down on an item.
itemMouseDown   ItemEvent.MOUSE_DOWNBroadcast when mouse button down on an item.
itemSelect   ItemEvent.SELECTBroadcast when the item moved to the center and stop.
itemChange   Event.CHANGEBroadcast just after change the current focus item
by calling gotoItem() function or click on other item.
complete   Event.COMPLETEBroadcast when the all buffer images loaded.


Code Example :

import com.digicrafts.events.*;    
function itemH(event:ItemEvent):void {
switch(event.type) {
//Mouse Over Event
case ItemEvent.MOUSE_OVER:
//do something when mouse over an item
trace(event.item.title);
trace(event.item.link);
break;
//Mouse Out Event
case ItemEvent.MOUSE_OUT:
//do something when mouse out an item
break;
//Mouse Click Event
case ItemEvent.CLICK:
//do something when mouse click an item
break;
//Mouse Click Event
case ItemEvent.SELECT:
//do something when an item selected
break;
}
}
menu_mc.addEventListener(ItemEvent.MOUSE_OVER,itemH);
menu_mc.addEventListener(ItemEvent.MOUSE_OUT,itemH);
menu_mc.addEventListener(ItemEvent.CLICK,itemH);
menu_mc.addEventListener(ItemEvent.SELECT,itemH);

Property

Type

Description

Default Value

Possible Value

length
Number
Get number of item in current album. Read Only
source String The path to the xml generate by Photoshop Web Gallery Function, Flickr rss or Youtube rss.
photo/photos.xml
url to the xml file
useThumbnail Boolean Determine the use of thumbnail image in the xml source as image. true true/false
proxy String The proxy script for cross domain issue.   url to the proxy script
buffer Number Number of image preloaded before the appear of the photoflip.
10
Positive Number
maxDimension Number The maximum dimension of the item. 120 Positive Number
popItemScale Number The scale of the center popup item related to the size of other item (maxDimension). 1.2 Number
itemDistance Number Distance between each item.
50
Any positive number.
popupItemDistance Number Distance between the center popup item and other items. 80 Any positive number.
itemScaleRatio Number The ratio of size for each item from the center to the side. 0.95 +/- 1
initPosition Number The initialize selected item. Set to -1 means Auto Center. -1 -1 and Any positive number.
vPerspective Number Set the vertical percentage of perspective scale. 0.6 0.0 - 1.0
hPerspective Number Set the horizontal percentage of perspective scale. 0.7 0.0 - 1.0
border Number Border size of the item.
1
Any positive number.
borderColor Number Border color.
0xffffff
Number in hex format 0x000000
borderHighlight Number Border size of the highlighted item.
1
Any positive number.
borderHighlightColor Number Border color of the highlighted item..
0xffffff
Number in hex format 0x000000
shadow Number Set the value of shadow effect.
0.5
0.0 - 1.0
mirror Number Set the value of mirror effect.
0.3
0.0 - 1.0
touchScrollEnabled Boolean Enable/Disable the touch scroll. true true/false
gotoCenterAction String Determine the mouse action to fire the goto center animation action. NONE NONE,CLICK
getURLAction String Determine the mouse action to fire the getURL action of each item. NONE NONE,CLICK
captionTargetName String The instance name of dynamic text field use for hold the caption. Any instance name of dynamic text field
scrollBarTargetName String The instance name of UIScroller/Slider use to control the scrolling of PhotoFLIP Any instance name of UIScroller/Slider
loaderSkin String The class name use of the skin for the loading animation   Any class name of movieclip symbol
 
Item Parameter Name Description
1 source The path to the xml generate by Photoshop Web Gallery Function, Flickr rss or Youtube rss.
2 proxy The proxy script for cross domain issue.
3 maxDimension The maximum dimension of the item. It define the square area with maxDimension X maxDimension which image do not excess it.
4 popItemScale The scale of the center popup item related to the size of other item (maxDimension).
5 itemDistance Distance between each item.
6 popupItemDistance Distance between the center popup item and other items.
     
 
Item Parameter Name Description
1 hPerspective Set the percentage of horizontal perspective scale.
2 vPerspective Set the percentage of vertical perspective scale.
3 itemScaleRatio The ratio define the size of the item related to the center item.
4 mirror Set the value of mirror effect.
5 shadow Set the value of shadow effect.
6 borderColor Border color.
7 border Border size of the item.
8 borderHighlightColor Border color of the highlighted item..
9 borderHighlight Border size of the highlighted item.
10 loaderSkin The class name of movieclip for the loader skin.
     
 
Item Parameter Name Description
1 initPosition Define the item in the center when the photoflip just start. Start from 0 to the length of the items minus 1.
2 touchScrollEnabled Enable/disable touch scroll.
3 mouseScroll Specify the amount of movement when mouse drag and scroll.
4 gotoCenterAction Specify the mouse action used to trigger the item click and goto center action.
5 getURLAction Specify the mouse action used to trigger the getURL action.
6 scrollBarTargetName Specify the instance name of UIScroller or Slider for controling the scroll.
7 captionTargetName Specify the instance name of dynamic text for the caption.
     
 
Item Parameter Name Description
1 - Default preset
2 - Preset 1
3 - Preset 2
4 - Load preset button
5 - Save preset button