Reference for CurveMenu CS

Method

Description

nextItem()Move to next item.
prevItem()Move to previous item.
load()Load xml source.
start()Start the menu.
stop()Stop the menu.
playVideo()Play video when the item have video.
pauseVideo()Pause video.
stopVideo()Complete stop the video.

 

CurveMenu.nextItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage CurveMenu.nextItem()

Returns None

Description Method; Move to next Item.

Code Example :

CurveMenu_mc.nextItem();

 

CurveMenu.prevItem()

Availability Flash Player 9.

Edition Flash CS3.

Usage CurveMenu.prevItem()

Returns None

Description Method; Move to previous item.

Code Example :

CurveMenu_mc.prevItem();

 

CurveMenu.load()

Availability Flash Player 9.

Edition Flash CS3.

Usage CurveMenu.load(xml)

Parameters

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

Returns None

Description Method; Load the xml source and setup CurveMenu

Code Example :

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

 

CurveMenu.start()

Availability Flash Player 9.

Edition Flash CS3.

Usage CurveMenu.start()

Returns None

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

Code Example :

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

 

CurveMenu.stop()

Availability Flash Player 9.

Edition Flash CS3.

Usage CurveMenu.start()

Returns None

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

Code Example :


CurveMenu_mc.stop();

CurveMenu.playVideo()

Availability Flash Player 9.

Edition Flash CS3.

Usage CurveMenu.playVideo()

Returns None

Description Method; Start playing the video.

Code Example :

CurveMenu_mc.playVideo();

 

CurveMenu.pauseVideo()

Availability Flash Player 9.

Edition Flash CS3.

Usage CurveMenu.pauseVideo()

Returns None

Description Method; Pause the video.

Code Example :


CurveMenu_mc.pauseVideo();

 

CurveMenu.stopVideo()

Availability Flash Player 9.

Edition Flash CS3.

Usage CurveMenu.stopVideo()

Returns None

Description Method; Stop the video.

Code Example :


CurveMenu_mc.stopVideo();

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.SELECTBroadcast when the thumbnail move to center.


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;
}
}
curvemenu_mc.addEventListener(ItemEvent.MOUSE_OVER,itemH);
curvemenu_mc.addEventListener(ItemEvent.MOUSE_OUT,itemH);
curvemenu_mc.addEventListener(ItemEvent.CLICK,itemH);
curvemenu_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
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
itemWidthNumberThe prefer width of each item 100Positive Number
itemHeightNumberThe prefer height of each item 100Positive Number
itemDistanceNumberDistance between each item.100Positive Number
middleItemDistanceNumberDistance between middle item and the side item.200Positive Number
curvatureNumberThe degree of circular item occupied.20+/- 360
middleItemScaleNumberThe scale of the middle item related to side item1.5Positive Number
itemScaleRatioNumberThe ratio which define the size of side item0.5Any Number
itemShadowNumberThe value of shadow4Positive Number
itemAlphaNumberThe value of alpha.50.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
itemMotionObjectSet the motion{y:10}Object with format {y:10}
keyboardControlEnabledBooleanEnable/Disable the keyboard control.truetrue/false
touchScrollEnabled Boolean Enable/Disable the touch scroll control. true 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""GOTO,GETURL"
itemOverActionStringDetermine the action do when mouse over on the items"GLOW,MOVE""GLOW,MOVE"
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
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.

 

Item Parameter Name Description
1 curvature The degree of circular item occupied.
2 itemWidth The prefer width of each item
3 itemHeight The prefer height of each item
4 itemScaleRatio The ratio which define the size of side item
5 oddItemCount The item count in one side of the menu
6 itemDistance Distance between each item.
7 middleItemDistance Distance between middle item and the side item.

 

Item Parameter Name Description
1 itemOverAction Enable/disable glow effect when mouse over.
2 Enable/disable item move when mouse.
3 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 .
4 This enable item goto center when click on item.
5 transitionType The transition type of the animation.
6 transitionTime The transition time of the animation. ( in seconds)
7 itemOverColor The glow color when mouse over.
8 itemMotion The movement of y when mouse over. Format is itemMotion = {y:10}

 

Item Parameter Name Description
1 keyboardControlEnabled Enable/Disable the keyboard control.
2 touchScrollEnabled Enable/Disable the touch scroll control.
3 wheelScrollEnabled Enable/Disable the mouse wheel control.
4 nextButtonTargetName The instance name of Button/SimpleButton use to control the move to next item
5 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
7 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 loaderSkin The class name use of the skin for the loading animation

 

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