Reference for PhotoFlip

Method

Description

getSelectedItem()To get the array of the menu item object.
nextItem()Tell the menu goto next item. This only work with enableMouseScroll set to false.
prevItem()Tell the menu goto prev item. This only work with enableMouseScroll set to false.
gotoItem()Tell the menu goto the item with ID. This only work with enableMouseScroll set to false.
setTextFormat()Tell the menu goto the item with ID. This only work with enableMouseScroll set to false.
loadXML()Load custom xml to build the PhotoFLIP
loadFlickrXML()Load Flickr RSS feed to build the PhotoFLIP
loadYouTubeXML()Load YouTube RSS feed to build the PhotoFLIP
loadArray()Load internal linked symbol to build the PhotoFLIP

 

PhotoFLIP.getSelectedItems()

Availability Flash Player 8.

Edition Flash 8.

Usage PhotoFLIP.getSelectedItem()

Returns Object; Object array of the menu items.

Description Method; Get the current selected item.

Code Example :

var item;
item = photoflip_mc.getSelectedItem();//Get the first item
trace(item.id);//Out put the id of selected item.

 

PhotoFLIP.nextItem()

Availability Flash Player 8.

Edition Flash 8.

Usage PhotoFLIP.nextItem()

Returns None

Description Method; Move to next item.

Code Example :

//Action Script in a button
on(press)
{
photoflip_mc.nextItem();//Move to next item
}

 

PhotoFLIP.prevItem()

Availability Flash Player 8.

Edition Flash 8.

Usage PhotoFLIP.prevItem()

Returns None

Description Method; Move to previous item.

Code Example :

//Action Script in a button 
on(press) {
photoflip_mc.prevItem();//Move to previous item
}

 

PhotoFLIP.gotoItem()

Availability Flash Player 8.

Edition Flash 8.

Usage PhotoFLIP.gotoItem(id)

Parameters

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

Returns None

Description Method; Goto the item with specified id.

Code Example :

//Action Script in a button 
on(press) {
photoflip_mc.gotoItem(10);//Goto the item with id 10
}

 

PhotoFLIP.setTextFormat()

Availability Flash Player 8.

Edition Flash 8.

Usage PhotoFLIP.setTextFormat(textFormat)

Parameters

textFormat: TextFormat Object create by TextFormat Class.

Returns None

Description Method; Set the text format of the caption.

Code Example :

var myFmt = new TextFormat;   
myFmt.color = 0xFFFFFF;//Set font color to black
myFmt.size = 12; //Set font size to 12
myFmt.bold = true; //Set font to bold
photoflip_mc.setTextFormat(myFmt);

 

PhotoFLIP.loadXML()

Availability Flash Player 8.

Edition Flash 8.

Usage PhotoFLIP.setTextFormat(xml)

Parameters

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

Returns None

Description Method; Load custom xml to build the PhotoFLIP.

Code Example :

photoflip_mc.loadXML("sample.xml");//load from extenal xml file

 

PhotoFLIP.loadFlickrXML()

Availability Flash Player 8.

Edition Flash 8.

Usage PhotoFLIP.loadFlickrXML(url)

Parameters

url: URL of Flickr RSS feed.

Returns None

Description Method; Load Flickr RSS feed to build the PhotoFLIP

Code Example :

//load from Flickr RSS feed
photoflip_mc.loadFlickrXML("http://api.flickr.com/services/feeds/photos_public.gne?format=rss_200");

 

PhotoFLIP.loadYouTubeXML()

Availability Flash Player 8.

Edition Flash 8.

Usage PhotoFLIP.loadYouTubeXML(url)

Parameters

url: URL of YouTube RSS feed.

Returns None

Description Method; Load YouTube RSS feed to build the PhotoFLIP

Code Example :

photoflip_mc.loadYouTubeXML("http://youtube.com/rss/global/  
recently_added.rss");//load from YouTube RSS feed

 

PhotoFLIP.loadArray()

Availability Flash Player 8.

Edition Flash 8.

Usage PhotoFLIP.loadArray(array)

Parameters

array: Array to hold the identify name of embeded movie symbol.

Returns None

Description Method; Load internal linked symbol to build the PhotoFLIP.

Code Example :

//"icon_1","icon_2","icon_3","icon_4" are the identify name of embeded movie symbol   
var name_array = new Array("icon_1","icon_2","icon_3","icon_4");
photoflip_mc.loadArray(name_array);

Event

Description

onItemPress()

Broadcast when mouse clicked on the item.

onItemDoubleClick()Broadcast when mouse double clicked on the item. Double clicktime delay can be set with propertry mouseDoubleClick.
onItemRollOver()Broadcast when mouse over on the item.
onItemRollOut()Broadcast when mouse move outside the item after mouse over.
onItemSelectedBroadcast when the item moved to the center (i.e. move to center mean selected).
onItemLoad()Broadcast when the image finish loading for each item.
onXMLLoad()Broadcast when the XML load completed.


Code Example :

//Define Event Listener Object 
var photoListener = new Object(); //Event for item clicked
photoListener.onItemPress = function(eventObj) {
//output the id of the item when clicked
trace(eventObj.selectedItem.id);
//Ouput the title of the item , xml node
trace(eventObj.selectedItem.title);
//Ouput the url of the item, xml node
trace(eventObj.selectedItem.link);
//Ouput the url of original image (FLICKR)
//xml
trace(eventObj.selectedItem.contentURL);
//Ouput the url of Thumbnail(FLICKR,YouTube)
//xml
trace(eventObj.selectedItem.contentThumbnailURL);
}

//Event when item double click
photoListener.onItemDoubleClick = function(eventObj) {
trace(eventObj.selectedItem.id);
}
//Event for roll over an item
photoListener.onItemRollOver = function(eventObj) {
trace(eventObj.selectedItem.title);//Ouput the title of the item
trace(eventObj.selectedItem.link);//Ouput the url of the item
}
//Event for roll out an item
photoListener.onItemRollOut = function(eventObj) {
trace(eventObj.selectedItem.title);//Ouput the title of the item
trace(eventObj.selectedItem.link);//Ouput the url of the item
}
//Event when item selected (i.e. goto center)
photoListener.onItemSelected = function(eventObj) {
trace(eventObj.selectedItem.title);//Ouput the title of the item
trace(eventObj.selectedItem.contentURL);//Ouput the url of the item
}
//Event when each item picture load successful
photoListener.onItemLoad = function(eventObj) {
trace(eventObj.selectedItem.id);
}
//Event when XML loaded, this event will not fire when using loadArray
photoListener.onXMLLoad = function(eventObj) {
trace("XML loaded");
}
//Add Event Listener
photoflip_mc.addEventListener("onItemPress",photoListener);
photoflip_mc.addEventListener("onItemDoubleClick",photoListener);
photoflip_mc.addEventListener("onItemRollOver",photoListener);
photoflip_mc.addEventListener("onItemRollOut",photoListener);
photoflip_mc.addEventListener("onItemLoad",photoListener);
photoflip_mc.addEventListener("onXMLLoad",photoListener);
photoflip_mc.addEventListener("onItemSelected",photoListener);

Property

Type

Description

Default Value

Possible Value

autoStart
Boolean
The parameter determine if you want the menu to autostart.
true
true/false
blurEffect
Boolean
The parameter determine where the blur effect active or not. This effect is only supported in Flash Player version 8+.
true
true/false
enableGetUrlBooleanEnable/disable getURL action of the items .
false
true/false
enableItemEventBooleanEnable/disable events of the items .
true
true/false
enableMouseScrollBooleanEnable/disable mouse scrolling.
true
true/false
globalScale
Number
Specfiy the scale of the item appear in the menu relative to it's orginal size.
1
Number > 1
fcLinkStringInstance name of other component which supported fcLINK. (needed to set in component inspector) Any instance name, _root.abc_mc or _parent.xyz_mc
instanceNameArray
Array
A array define the identifier name array of the symbols which use for create the menu.
[]
Any string
itemLinkArray
Array
A array define the url link for each item in the menu. If you don't want the menu item appeared as a link or you want to define your action in your item, leave this array blank.
[]
Any valid URL,
product.html or other vaild url
itemLinkTargetArray
Array
A array define the url link traget for each item in the menu. If you don't want the menu item appeared as a link or you want to define your action in your item, leave this array blank.
[]
_blank, _self, _parent, or other name
menuAlignment
String
Determine the alighment of the menu item. The item can be align for top, middle or bottom.
middle
top / middle / bottom
menuOrientation
String
Determine the orientation of the rotation menu. The menu can be in horizontal or vertical.
horizontal
horizontal / vertical
mirrorEffect
Boolean
The parameter determine where the mirror effect active or not. This effect is only supported in Flash Player version 8+.
true
true/false
perspectiveScaling
Boolean
The parameter determine where the perpective scaling effect active or not.
true
true/false
perspectiveTransform
Boolean
The parameter determine where the perpective transform effect active or not.
true
true/false
rotationDirection
String
The parameter determine where the behaviour of the menu to the mouse gesture.
Opposite Mouse
Opposite Mouse / Follow Mouse
rotationSpeed
Number
The parameter determine where the perpective transform effect active or not. This parameter accepts values from 1 to 100.
50
1 - 150
rotationSpeedLimit
Number
The parameter determine the speed limit of the rotation. The speed is measured in angle rotated per frame.
10
1 - 360
enabled
Boolean
Determines whether the component is enabled or not.
true
true
visible
Boolean
Determines the visibility of the component.
true
true
 
Item Parameter Name Description
1 srcMovieArray A array define the identifier name array of the symbols linkage name which use for create the menu.
2 srcXML The path to the xml generate by Photoshop Web Gallery Function, Flickr rss or Youtube rss.
3 srcFlickrXML The path to the flickr xml rss. Must be rss2 format.
4 useThumbnail Enable/disable using thumbnail image defined in the xml for image source.
5 srcYouTubeXML The path to the YouTube xml rss.
6 proxy The proxy script for cross domain issue.
     
 
Item Parameter Name Description
1 maxDimension The maximum dimension of the item. It define the square area with maxDimension X maxDimension which image do not excess it.
2 popItemScale The scale of the center popup item related to the size of other item (maxDimension).
3 hPerspective Set the percentage of horizontal perspective scale.
4 vPerspective Set the percentage of vertical perspective scale.
5 itemDistance Distance between each item.
6 enableItemBorder Enable/disable item border.
7 itemBorderStroke Set the thickness of item border.
8 itemBorderColor Set the color of the item border.
9 itemBorderHighlightColor Set the color of the item border when highlighted.
10 enableShadowEffect Enable/disable shadow effect.
11 enableBlurEffect The parameter determine where the blur effect active or not. This effect is only supported in Flash Player version 8+.
12 enableFadeOutSide Enable/disable fading effect in side items.
13 enableCaption Enable/disable internal caption.
14 enableScrollBar Enable/disable internal scrollbar.
15 enableInitCenter Enable/disable the middle is seleted as default.
16 skinName The name of the skin.
17 scrollbarPosition The position of the internal scrollbar. Format is top,left,width,height. (e.g 30,50,10,150 will set the scroll bar to x 30, y 50 with 10 height and 150 width)
     
 
Item Parameter Name Description
1 itemClickable Enable/disable events of the items .
2 enableGetUrl Enable/disable getURL action of the items .
3 getUrlTarget A array define the url link traget for each item in the menu. If you don't want the menu item appeared as a link or you want to define your action in your item, leave this array blank.
4 enableClickGotoCenter Enable/disable the item gotot center when click.
5 enableMouseScroll Enable/disable mouse scrolling.
6 mouseScrollSpeed Set the speed of mouse scroll.
7 mouseDoubleClick Set the speed of doubleclick. ( 0 to disable, value in mil sec.)
8 fcLink Instance name of other component which supported fcLINK. (needed to set in component inspector)