# Help needed with AS2 snippet for vertical thumbnails

**URL:** <https://forum.kirupa.com/t/help-needed-with-as2-snippet-for-vertical-thumbnails/316044>\
**Category:** flash\
**Created:** [November 11, 2010, 9:00am UTC](https://forum.kirupa.com/t/help-needed-with-as2-snippet-for-vertical-thumbnails/316044 "2010-11-11T09:00:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mnkei](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@mnkei](https://forum.kirupa.com/u/mnkei)\
**Post date:** [November 11, 2010, 9:00am UTC](https://forum.kirupa.com/t/help-needed-with-as2-snippet-for-vertical-thumbnails/316044/1 "2010-11-11T09:00:25Z")

</div>

Hi all, this is actually my first post and was hoping someone might be able to assist me with a problem im having.

[SIZE=“2”]function setupTPS():void{  
if(numberOfImages \< 11){  
//Panel Dimensions  
panelVisibleX = Math.floor(StageHeight - 65 - bottomMargin);  
panelVisibleY = Math.floor(StageWidth/2 - (73_numberOfImages/2));  
panelW = 75;  
panelH = (73_numberOfImages/2);  
}  
else{  
//Panel Dimensions  
panelVisibleX = Math.floor(StageHeight - 65 - bottomMargin);  
panelVisibleY = Math.floor(StageWidth/2 - 800/2);  
panelW = 75;  
panelH = 800;  
}  
//THUMBNAIL SCROLLING PANEL  
TPS.x = panelVisibleX;  
TPS.y = panelVisibleY;  
TPS.graphics.clear();  
TPS.graphics.beginFill(0x000000,0);  
TPS.graphics.drawRect(0, 0, panelW, panelH);  
TPS.graphics.endFill();  
//THUMBNAIL PANEL MASK  
thumbMask.x = panelVisibleX;  
thumbMask.y = panelVisibleY;  
thumbMask.graphics.clear();  
thumbMask.graphics.beginFill(0x000000,1);  
thumbMask.graphics.drawRect(0, 0, panelW, panelH);  
thumbMask.graphics.endFill();  
//THUMBNAIL PANEL MASK BORDER  
thumbMask\_border.x = panelVisibleX - 2;  
thumbMask\_border.y = panelVisibleY - 2;  
thumbMask\_border.width = panelW + 4;  
thumbMask\_border.height = panelH + 4;  
//Tween up  
if(firstLoad){  
getThumbnail();  
firstLoad = false;  
}  
}[/SIZE]

this is a snippet from my code for the gallery within my site, this is the part that creates the thumbnail panel that scrolls, im quite confused with he code. im trying to make it vertical but every time i try and alter or edit the code nothing works.

hope someone can help, please let me know if you need anything more.

toby
