Custom Item Action for PhotoFLIP CS (AS3)

Author: Last Update: 08/04/2008

Add click action to PhotoFLIP CS

1. Setup a working PhotoFLIP by following the quick start.


2. In the frame contains the photoFLIP, fill in the following script.

//Import libray
import flash.events.*;
import com.digicrafts.events.*;

//Event Handler
function eventHandler(event:ItemEvent) {
switch(event.type){
case ItemEvent.CLICK:
//Index for clicked item
trace(event.index);
//Data for clicked item
trace(event.target.item);
break;
}
}
//Add Event Listener
photoflip.addEventListener(ItemEvent.CLICK,eventHandler);

event.item properties

Item properties Description Flickr
XML Node
Youtube
XML Node
PhotoShop
XML Node
event.item.path Path of the image <media:content> <enclosure> <image>
event.item.width Image's width <media:content> - <image>
event.item.height Image's height <media:content> - <image>
event.item.thumbpath Path of thumbnial image <media:thumbnail> <media:thumbnail> <image>
event.item.thumbwidth Thumbnial's width <media:thumbnail> <media:thumbnail> <image>
event.item.thumbheight Thumbnial's height <media:thumbnail> <media:thumbnail> <image>
event.item.title Title <title> <title> <meta name="title">
event.item.link Link <link> <link> <meta name="link">
event.item.description Description <description> <description> <meta name="title">
event.item.author Author <author> <author> <meta name="author">
event.item.credit Credit <media:credit> <media:credit> <meta name="credit">