# OnMouse Over scaling of TileList Elements

**URL:** <https://forum.kirupa.com/t/onmouse-over-scaling-of-tilelist-elements/258199>\
**Category:** flash\
**Created:** [April 22, 2008, 12:03am UTC](https://forum.kirupa.com/t/onmouse-over-scaling-of-tilelist-elements/258199 "2008-04-22T00:03:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anujsharma181](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@anujsharma181](https://forum.kirupa.com/u/anujsharma181)\
**Post date:** [April 22, 2008, 12:03am UTC](https://forum.kirupa.com/t/onmouse-over-scaling-of-tilelist-elements/258199/1 "2008-04-22T00:03:39Z")

</div>

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;  
}
