Add custom caption or description to the components

Author: Last Update: 28/08/2008

Add the <description> tag in the xml.

 

<item path="cover/3.jpg" width="130" height="170" type="bitmapfile">
<title>Galaxy 1</title>
<description>YOUR DESCRIPTION</description>
<link/>
</item>

 

Create a dynamic text and name it as description_txt and named you photospin as photo_mc

 

import com.digicrafts.events.*;

photo_mc.addEventListener(ItemEvent.SELECT,itemHandler);

function itemHandler(event:ItemEvent) {
 switch(event.type){
  case ItemEvent.SELECT:
    trace(event.item.description);
    description_txt.text = event.item.description;
  break;
 }
}