Reference for PageTurn 3D CS

Method

Description

gotoItem()

Move to item with specify item index. Start with zero.

(Work only when mouse scroll disabled)

nextItem()

Move to next item.

(Work only when mouse scroll disabled)

prevItem()

Move to previous item.

(Work only when mouse scroll disabled)

load()Load xml source.
start() Start the book.
stop() Stop the book.

 

RotationMenu3D.gotoItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage RotationMenu3D.gotoItem(index)

Parameters

index: index of the page. Start from zero

Returns None

Description Method; Move to page with specify index.

Code Example :

RotationMenu3D_mc.gotoItem(10); //goto item with index 10

 

RotationMenu3D.nextItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage RotationMenu3D.nextItem()

Returns None

Description Method; Move to next page.

Code Example :

RotationMenu3D_mc.nextItem();

 

RotationMenu3D.prevItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage RotationMenu3D.prevItem()

Returns None

Description Method; Move to previous page.

Code Example :

RotationMenu3D_mc.prevItem();

 

RotationMenu3D.load()

Availability Flash Player 9.

Edition Flash CS3.

Usage RotationMenu3D.load(xml)

Parameters

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

Returns None

Description Method; Load the xml source and setup RotationMenu3D

Code Example :

//Load the source xml named books.xml.  
RotationMenu3D_mc.load("books.xml");

 

RotationMenu3D.start()

Availability Flash Player 9.

Edition Flash CS3.

Usage RotationMenu3D.start()

Returns None

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

Code Example :

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

 

RotationMenu3D.stop()

Availability Flash Player 9.

Edition Flash CS3.

Usage RotationMenu3D.start()

Returns None

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

Code Example :


RotationMenu3D_mc.stop();

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.
completeItemEvent.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;
}
}
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

dataProvider
DataProvider
Get the DataProvider for the components 
sourceString The path to the xml generate by Photoshop Web Gallery Function, Flickr rss, Youtube rss, or custom xml.
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
itemWidthNumber The width of each item. This value is the actual value when zoom. 200 Positive Number
itemHeightNumber The height of each item. This value is the actual value when zoom. 200 Positive Number
radius Number The radius of the rotation menu 800 Positive Number
itemDepth Number The default depth of each item. 200 Positive Number
cameraAngle Number Angle pan for the camera view 20 -45 - 45
cameraZoom Number Set the camera zoom value. 1 Positive Number
itemMirror Number Value of mirror effect .5 0 - 1
itemShadow Number Value of shadow effect .5 0 - 1
itemAlphaNumber Value of depth of field alpha effect. .5 0 - 1
transitionTimeNumberThe transition time of the animation. ( in seconds)1 secPositive Number
transitionTypeStringThe transition type of the animation.easeOutSineAny String
keyboardControlEnabledBooleanEnable/Disable the keyboard control.truetrue/false
touchScrollDirection Boolean Enable/Disable the reverse touch scroll control. true true/false
touchScrollEnabledBooleanEnable/Disable the touch scroll control.truetrue/false
mouseScrollDirection Boolean Enable/Disable the reverse mouse scroll control. true true/false
mouseScrollEnabled Boolean Enable/Disable the touch mouse control. false true/false
wheelScrollEnabledBooleanEnable/Disable the mouse wheel control.truetrue/false
itemClickActionStringDetermine the action do when mouse click on the items. "GOTO,POPUP" "POPUP,GETURL,GOTO"
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

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   Position Setting
2   Dimension Setting
3 radius Radius of the rotation menu.
4 cameraAngle Angle of view of the camera.
5 cameraZoom Camera zoom value.
6 itemLockOrientation Lock the orientation of the items.

 

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-9 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    
7 nextButtonTargetName The instance name of Button/SimpleButton use to control the move to next item
6 prevButtonTargetName The instance name of Button/SimpleButton use to control the move to previous item
9 scrollBarTargetName The instance name of UIScrollbar/Slider use to control the menu movement

 

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