# Making two columns of duplicateMovieClip

**URL:** <https://forum.kirupa.com/t/making-two-columns-of-duplicatemovieclip/232400>\
**Category:** Uncategorized\
**Created:** [July 13, 2007, 11:49am UTC](https://forum.kirupa.com/t/making-two-columns-of-duplicatemovieclip/232400 "2007-07-13T11:49:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![onyxtacular](https://avatars.discourse-cdn.com/v4/letter/o/7ab992/32.png) [@onyxtacular](https://forum.kirupa.com/u/onyxtacular)\
**Post date:** [July 13, 2007, 11:49am UTC](https://forum.kirupa.com/t/making-two-columns-of-duplicatemovieclip/232400/1 "2007-07-13T11:49:04Z")

</div>

I’ve got this code that scrolls thumbnails. I would like to two columns instead of one. The problem is the first thumb stays put instead of scrolling. if anyone knows how to fix this please help. I’m not that versed in Actionscript, a friend of mine came up with the modified script.  
I’m trying to get done for work…We don’t have a flash programmer on board and somehow I got the responisiblity.

The entire code is located at [[COLOR=#0000ff]http://onyxtacular.com/doorgallerycherry.zip [/COLOR]](http://onyxtacular.com/doorgallerycherry.zip)  
Thanks,  
Damian

Original code:  
while (k \< len)  
{  
var \_mc = thumbBlock.thumbImg.duplicateMovieClip(“thumbImg” + k, k);  
\_mc.targetY = spaceY \* k;  
\_mc.\_y = -50 \* k;  
\_mc.no = i;  
loadThumb(\_mc, \_mc.no);  
if (k == showNum + 1)  
{  
\_mc.\_y = \_mc.targetY = -spaceY;  
\_mc.no = i = totalNum - 1;  
loadThumb(\_mc, \_mc.no);  
} // end if  
if (i == totalNum - 1)  
{  
i = 0;  
}  
else  
{  
++i;  
} // end else if

modified code:  
switchX + “l”;  
while (k \< len)

{  
var \_mc = thumbBlock.thumbImg.duplicateMovieClip(“thumbImg” + k, k);  
thumbAdjustX = thumbXsize + xSpaceThumb;  
leftX = \_mc.\_x;  
rightX = \_mc.\_x + thumbAdjustX;  
if(switchX == “l”){  
\_mc.\_y = -10 \* k;  
\_mc.targetY = spaceY \* k;  
rightThumbTargetY = \_mc.targetY;  
rightThumbY = \_mc.\_y;  
\_mc.\_x = leftX;  
switchX = “r”;  
} else if(switchX = “r”){  
\_mc.\_x += thumbAdjustX;  
\_mc.\_y = rightThumbY;  
\_mc.targetY = rightThumbTargetY;  
switchX = “l”;  
}  
\_mc.no = i;  
loadThumb(\_mc, \_mc.no);  
if (k == totalNum + 1)  
{  
\_mc.\_y = \_mc.targetY = -spaceY;  
\_mc.no = i = totalNum - 1;  
loadThumb(\_mc, \_mc.no);  
} // end if
