Hi Guys
Can anyone help me in scaling TileList elements on mouse hover. Below is my
code. What I did is I put 16 SWfs in Tile List uisng XML and it is working
fine. On Double click of thumbnails I would be able to load videos too. I am
successful in getting the index of selected item  for click and double click
events by  using selectedIndex property. My problem is that I want
thumbnails to expand and contract with the mouse over and mouse out. I am
not successful in getting the index of hovered thumbnail and I am messing up
things because when i used my logic(which is not right :-)) for scale X and
scale Y it is going to scale the whole tileList component but not the
hovered thumbnail. i am not sure how to target to get the index of hovered
thumbnail in the tileList.
Please help me out
Thanks for your help.
Anuj


//Defining Metadata for loading external thumbnails
var picsXML:XML = <items>
        <item label="Camera-1" source="video/pic_1.swf" />
        <item label="Camera-2" source="video/pic_2.swf" />
        <item label="Camera-3" source="video/pic_3.swf" />
        <item label="Camera-4" source="video/pic_4.swf" />
        <item label="Camera-5" source="video/pic_5.swf" />
        <item label="Camera-6"source="video/pic_6.swf" />
        <item label="Camera-7"source="video/pic_7.swf" />
        <item label="Camera-8"source="video/pic_8.swf" />
        <item label="Camera-9" source="video/pic_8.swf" />
        <item label="Camera-10" source="video/pic_10.swf" />
        <item label="Camera-11" source="video/pic_11.swf" />
        <item label="Camera-12" source="video/pic_12.swf" />
        <item label="Camera-13" source="video/pic_13.swf" />
        <item label="Camera-14" source="video/pic_14.swf" />
        <item label="Camera-15" source="video/pic_15.swf" />
        <item label="Camera-16" source="video/pic_16.swf" />
    </items>;


var myTileList:TileList=new TileList();
var TileListLength:Number;
myTileList.dataProvider = new DataProvider(picsXML);
myTileList.direction = ScrollBarDirection.HORIZONTAL;
myTileList.rowHeight = 115;
myTileList.columnWidth = 200;
myTileList.width = 800;
myTileList.height = 135;
TileListLength=myTileList.length;
myTileList.move(52,500);
addChild(myTileList);

//Getting the index of the thumbnails
myTileList.doubleClickEnabled=true;
myTileList.addEventListener(MouseEvent.MOUSE_OVER,scale);
myTileList.addEventListener(MouseEvent.MOUSE_OUT,scaleBack);


function scale(e:MouseEvent):void
{
myTileList.scaleX=1.5;
cmyTileList.scaleY=1.5;
}

function scaleBack(e:MouseEvent):void
{
myTileList.scaleX=1;
cmyTileList.scaleY=1;
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to