Reference for PhotoFlip 3D CS

Method

Description

gotoItem() Goto item with specify index
nextItem()Move to next item.
prevItem()Move to previous item.
load()Load xml source.
start()Start the menu.
stop()Stop the menu.
openPopup() Popup the center item.
closePopup() Close the popuped center item.

 

PhotoFlip3D.gotoItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFlip3D.gotoItem(index)

Parameter

index: index number of the item.

Returns None

Description Method; Move to item with specify index.

Code Example :

PhotoFlip3D_mc.gotoItem(3);  
PhotoFlip3D.nextItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFlip3D.nextItem()

Returns None

Description Method; Move to next Item.

Code Example :

PhotoFlip3D_mc.nextItem();

 

PhotoFlip3D.prevItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFlip3D.prevItem()

Returns None

Description Method; Move to previous item.

Code Example :

PhotoFlip3D_mc.prevItem();

 

PhotoFlip3D.load()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFlip3D.load(xml)

Parameters

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

Returns None

Description Method; Load the xml source and setup PhotoFlip3D

Code Example :

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

 

PhotoFlip3D.start()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFlip3D.start()

Returns None

Description Method; Start the tunnel if xml is loaded and the tunnel not started yet.

Code Example :

//Load the xml 
PhotoFlip3D_mc.load("photo.xml");
//Start
PhotoFlip3D_mc.start();

 

PhotoFlip3D.stop()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFlip3D.start()

Returns None

Description Method; Stop the tunnel when the tunnel is in started state.

Code Example :


PhotoFlip3D_mc.stop();

PhotoFlip3D.openPopup()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFlip3D.openPopup(index)

Parameters

index: Index of the item. When index defined the item not in center, the item will move to center before popup.

Returns None

Description Method; Popup the centered item.

Code Example :

PhotoFlip3D_mc.openPopup();

 

PhotoFlip3D.closePopup()

Availability Flash Player 9.

Edition Flash CS3.

Usage PhotoFlip3D.closePopup()

Returns None

Description Method; Close any popuped center item

Code Example :


PhotoFlip3D_mc.closePopup();

To use event, you need to import the library:

import com.digicrafts.events.*;

Event

Object

Description

itemClickItemEvent.CLICK

Broadcast when mouse clicked on the item.

itemMouseOverItemEvent.MOUSE_OVERBroadcast when mouse over on the item.
itemMouseOutItemEvent.MOUSE_OUTBroadcast when mouse move outside the item after mouse over.
completeEvent.COMPLETEBroadcast when the all buffer images loaded.
selectItemEvent.SELECT Broadcast when the item move to center.
popupOpen ItemEvent.OPEN Broadcast when the popup opened.
popupClose ItemEvent.CLOSE Broadcast when the closed after open.


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
//You can get the item item by
trace(event.index);
//You can get the data object by
trace(event.item);
// You can get parameter inside data object by
trace(event.item.source);
trace(event.item.title);
trace(event.item.description);
trace(event.item.link);
trace(event.item.width);
trace(event.item.height);
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;
//Thumbnail Move Complete
case ItemEvent.SELECT:
//do something when the thumbnail move to center
break;
}
}
photoflip_mc.addEventListener(ItemEvent.MOUSE_OVER,itemH);
photoflip_mc.addEventListener(ItemEvent.MOUSE_OUT,itemH);
photoflip_mc.addEventListener(ItemEvent.CLICK,itemH);
photoflip_mc.addEventListener(ItemEvent.SELECT,itemH);

Property

Type

Description

Default Value

Possible Value

dataProvider
DataProvider
Get the DataProvider for the components 
sourceStringThe path to the xml generate by Photoshop Web Gallery Function, Flickr rss or Youtube rss.
photo/photos.xml
url to the xml file
bufferCount Number The number of image buffer before start. ( -1 = Load all images) -1 Positive Number
useThumbnailBooleanDetermine the use of thumbnail image in the xml source as image. truetrue/false
proxyStringThe proxy script for cross domain issue.  url to the proxy script
autostartBooleanEnable auto start when xml and image loaded
true
true/false
oddItemCountNumberThe item count in one side of the menu7Positive Number
infiniteScrollEnabled Boolean Enable reprating of items when scrolling.
true
true/false
itemWidthNumber The prefered width of each item 200Positive Number
itemHeightNumber The prefered height of each item 200Positive Number
itemDepth Number The prefered depth of each item 100 Positive Number
itemDistanceNumber Distance in X-asix between each item. 200Positive Number
itemDistanceZ Number Distance in Z-asix between each item. 100 Positive Number
middleItemDistance Number Distance in X-asix between middle item and side item. 200 Positive Number
middleItemDistanceZ Number Distance in Z-asix between middle item and side item. 100 Positive Number
itemRotation Number Rotation of the side item 30 +/- 180
middleItemScaleNumberThe scale of the middle item related to side item1.5Positive Number
itemScaleRatioNumberThe ratio which define the size of side item0.5Any Number
itemBaseColor Number Set the base color of item. 0x999999 Color Value
defaultMaterial Object Set the default material for the item. The items will use these materila if no material specify in the xml. Format of the object { back:"xxx.jpg", top:"xxx.jpg", bottom:"xxx.jpg", left:"xxx.jpg", right:"xxx.jpg"} { back:"", top:"", bottom:"", left:"g", right:""} { back:"xxx.jpg", top:"xxx.jpg", bottom:"xxx.jpg", left:"xxx.jpg", right:"xxx.jpg"}
cameraY Number Set the camera Y value. 200 Positive Number
popupMotion Object Set the rotation of the popup item. {rotationY:180} {rotationY: degree}
itemShadowNumber The value of shadow effect 10Positive Number
itemAlphaNumber The value of alpha effect.50.0 - 1.0
itemMirror Number The value of mirror effect .5 0.0 - 1.0
transitionTimeNumberThe transition time of the animation. ( in seconds)1.5 secPositive Number
transitionTypeStringThe transition type of the animation.easeOutSineAny String
itemOverColorNumberSet the color of glow when mouse over.0x000000Color Value
itemOverColorSize Number Set the size of color glow when mouse over. 5 Positive Number
keyboardControlEnabledBooleanEnable/Disable the keyboard control.truetrue/false
touchScrollEnabledBooleanEnable/Disable the touch scroll control.truetrue/false
touchScrollDirection Boolean Enable/Disable to reverse the direction of touch scroll. false true/false
touchScrollAcceleration Number Momentum after mouse up of touch touch scroll 1 positive value > 1
touchScrollStrength Number Set the strength of touch scroll. 30 positive value
wheelScrollEnabledBooleanEnable/Disable the mouse wheel control.truetrue/false
itemClickActionStringDetermine the action do when mouse click on the items. "GOTO,POPUP" "GOTO,GETURL,POPUP"
itemOverActionStringDetermine the action do when mouse over on the items"GLOW""GLOW"
captionTargetNameStringThe instance name of dynamic text field use for hold the caption.  Any instance name of dynamic text field
nextButtonTargetNameStringThe instance name of Button/SimpleButton use to control the move to next item Any instance name of Button/ SimpleButton
prevButtonTargetNameStringThe instance name of Button/SimpleButton use to control the move to previous item Any instance name of Button/ SimpleButton
scrollBarTargetNameStringThe instance name of UIScrollbar/Slider use to control the menu movement Any instance name of Button/ SimpleButton
loaderSkinStringThe class name use of the skin for the loading animation  Any class name of movieclip symbol

Read Only Properties

Property

Type

Description

selectedItem
*
Selected Item.
selectedItemData Object The data of selected item.
selectedItemIndex Number The selected item id.
started Boolean Determine about the components if it is started.
length Number Length of the current datasource.
Item Parameter Name Description
1 source The path to the xml generate by Photoshop Web Gallery Function, Flickr rss or Youtube rss.
2 useThumbnail Enable/disable using thumbnail image defined in the xml for image source.
3 autostart Enable auto start when xml and image loaded
4 proxy The proxy script for cross domain issue.
5 bufferCount The number of image buffer before start. ( -1 = Load all images)

 

Item Parameter Name Description
1 infiniteScrollEnabled Enable reprating of items when scrolling.
2 cameraY Set the camera Y value.
3 oddItemCount The item count in one side of the menu
4 middleItemScale The ratio which define the size of side item
5 itemScaleRatio The item count in one side of the menu
6 itemRotation The rotation of the side item
7 middleItemDistance Distance in X-asix between middle item and side item.
8 middleItemDistanceZ Distance in Z-asix between middle item and side item.
9 itemDistance Distance in X-asix between each item.
10 itemDistanceZ Distance in Z-asix between each item.

 

Item Parameter Name Description
1 itemWidth The prefered width of each item
2 itemHeight The prefered height of each item
3 itemDepth The prefered depth of each item
4 itemBaseColor Set the base color of item.
5 defaultMaterial Set the default material for the item. The items will use these materila if no material specify in the xml. Format of the object { back:"xxx.jpg", top:"xxx.jpg", bottom:"xxx.jpg", left:"xxx.jpg", right:"xxx.jpg"}

 

Item Parameter Name Description
1 itemOverAction Enable/disable glow effect when mouse over.
2 itemOverColor Set the color of glow when mouse over.
3 itemOverColorSize Set the size of color glow when mouse over.
4 itemClickAction Enable/disable getURL action when click on item. Default will link to the image. It will link to url specify in xml <link> tag if <link> is not empty .
5 This enable item goto center when click on item.
6 This enable item popup when click on item.
7 popupMotion Set the rotation of popup item.
8 Set the scale of popup item.
9 transitionType The transition type of the animation.
10 transitionTime The transition time of the animation. ( in seconds)

 

 

Item Parameter Name Description
1 keyboardControlEnabled Enable/Disable the keyboard control.
2 touchScrollEnabled Enable/Disable the touch scroll control.
3 touchScrollDirection Enable/Disable revers direction of touchscroll
4 wheelScrollEnabled Enable/Disable the mouse wheel control.
5 mouseScrollEnabled Enable/Disable the mouse over scrollcontrol.
6 nextButtonTargetName The instance name of Button/SimpleButton use to control the move to next item
7 prevButtonTargetName The instance name of Button/SimpleButton use to control the move to previous item
6 scrollBarTargetName The instance name of UIScrollbar/Slider use to control the menu movement
9 captionTargetName The instance name of dynamic text field use for hold the caption.

 

Item Parameter Name Description
1 itemAlpha The value of alpha effect for the side item.
2 itemShadow The value of shadow effect.
3 itemMirror The value of mirror effect.
4 loaderSkin The class name use of the skin for the loading animation

 

Item Parameter Name Description
1
-
Load Preset Button
2
-
Save Preset Button