help needed with this script below

activeden.net/item/xml-imagevideo-grid-gallery/94637

t]Flash - XML Image/Video Grid Gallery | ActiveDen[/url]he thumbnails load up vertical and in the .xml file i edit the file to the order i want it to load up which is horizontal, but because it loads up vertical it makes the order show up vertical.

here is the support the author provided.

--------------------------------------------------------------------------
How to load the thumbnails horizontal instead vertical?
In the loadThumb function in the Main.as, at about line 236, you can custom to:

/*if (xCol+1 < Math.ceil(assetsNum/rows)) { xCol++;} else { xCol = 0; yCol ++;}*/if(yCol+1 < rows){ yCol++;}else{ yCol = 0; xCol++;}This will change the thumbnails loading direction.

--------------------------------------------------------------------------------

here is the coding i have for what the author is referring to.

vate function loadThumb() : void
{
var _loc_1:Sprite;
var _loc_2:uint;
var _loc_3:uint;
var _loc_4:int;
var _loc_5:Number;
var _loc_6:Number;
var _loc_7:Sprite;
var _loc_8:ApdevVideoPlayerDefaultStyle;
var _loc_9:Thumbnail;
var _loc_10:Sprite;
var _loc_11:Object;
var _loc_12:Loader;
var _loc_13:Number;
var _loc_14:Sprite;
addChild(gridContainer);
gridContainer.addChild(thumbContainer);
gridWidth = columns * (thumbWidth + thumbPadding) - thumbPadding;
gridHeight = rows * (thumbHeight + thumbPadding);
_loc_1 = new Sprite();
_loc_1.graphics.beginFill(0, 0.4);
_loc_1.graphics.drawRect(-10, -10, gridWidth + 20, gridHeight + 20);
_loc_1.graphics.endFill();
gridMask.addChild(_loc_1);
thumbContainer.mask = gridMask;
gridContainer.addChild(gridMask);
actColumns = Math.ceil(Math.ceil(assetsNum / rows) / columns);
_loc_2 = 0;
_loc_3 = 0;
_loc_4 = 0;
while (_loc_4 < assetsNum)
{

_loc_9 = new Thumbnail();
_loc_10 = new Sprite();
var _loc_15:int;
_loc_10.scaleY = 0;
new Sprite().scaleX = _loc_15;
Tweener.addTween(_loc_10, {_scale:1, time:0.4, delay:0.05 * _loc_4, transition:"easeOutSine"});
_loc_10.name = _loc_4.toString();
_loc_10.buttonMode = true;
_loc_10.x = thumbWidth * 0.5 + _loc_2 * (thumbWidth + thumbPadding);
_loc_10.y = thumbHeight * 0.5 + _loc_3 * (thumbHeight + thumbPadding);
_loc_10.addEventListener(MouseEvent.CLICK, clickThumb);
_loc_9.width = thumbWidth + 6;
_loc_9.height = thumbHeight + 14.9;
_loc_11 = {};
_loc_11.x = _loc_9.x;
_loc_11.y = _loc_9.y;
posArr[_loc_4] = _loc_11;
_loc_10.addChild(_loc_9);
thumbContainer.addChild(_loc_10);
_loc_12 = new Loader();
thumbLoaderArr[_loc_4] = _loc_12;
_loc_10.addChild(_loc_12);
_loc_12.x = (-thumbWidth) * 0.5;
_loc_12.y = (-thumbHeight) * 0.5;
if (_loc_3 + 1 < rows)
{
}
else
{
_loc_3++ = 0;
}
_loc_4++;
}
thumbLoaderArr[0].load(new URLRequest(thumbArr[0]));
thumbLoaderArr[0].contentLoaderInfo.addEventListener(Event.COMPLETE , thumbComplete);
thumbLoaderArr[0].contentLoaderInfo.addEventListener(IOErrorEvent.I O_ERROR, thumbIOError);
_loc_5 = 8;
_loc_6 = 2;
_loc_7 = new Sprite();
gridContainer.addChild(_loc_7);
_loc_7.y = gridHeight + _loc_5;
_loc_7.x = gridWidth - (_loc_5 * 2 + _loc_6 * 2) * actColumns + 2 * _loc_5 - 2 * _loc_6;
if (actColumns > 1)
{
_loc_13 = 0;
while (_loc_13++ < actColumns)
{

_loc_14 = new Sprite();
_loc_14.graphics.beginFill(10066329, 1);
_loc_14.graphics.drawCircle(0, 0, _loc_5);
_loc_14.graphics.endFill();
_loc_14.x = _loc_13 * 2 * (_loc_5 + _loc_6);
_loc_14.buttonMode = true;
_loc_14.name = _loc_13.toString();
_loc_14.addEventListener(MouseEvent.CLICK, clickButton);
btnArr[_loc_13] = _loc_14;
_loc_7.addChild(_loc_14);
}
Tweener.addTween(btnArr[currentBtnNum], {_color:3355443, time:0.4, transition:"easeOutSine"});
}
assetBg.graphics.beginFill(16777215, 1);
assetBg.graphics.drawRect((-videoWidth) * 0.5, (-videoHeight) * 0.5, videoWidth, videoHeight);
assetBg.graphics.endFill();
assetContainer.addChild(assetBg);
Tweener.addTween(assetBg, {_DropShadow_blurX:16, _DropShadow_blurY:16, _DropShadow_angle:45, _DropShadow_distance:4, _DropShadow_alpha:0.2, time:0.3});
addChild(assetContainer);
preBtn.rotation = -180;
assetContainer.addChild(preBtn);
assetContainer.addChild(nextBtn);
var _loc_15:Boolean;
preBtn.buttonMode = true;
nextBtn.buttonMode = _loc_15;
nextBtn.addEventListener(MouseEvent.MOUSE_OVER, overButton);
preBtn.addEventListener(MouseEvent.MOUSE_OVER, overButton);
nextBtn.addEventListener(MouseEvent.MOUSE_OUT, outButton);
preBtn.addEventListener(MouseEvent.MOUSE_OUT, outButton);
nextBtn.addEventListener(MouseEvent.CLICK, clickNext);
preBtn.addEventListener(MouseEvent.CLICK, clickPre);
_loc_8 = new ApdevVideoPlayerDefaultStyle();
_loc_8.bgGradient1 = 0;
_loc_8.controlsBg = 0;
_loc_8.controlsBgAlpha = 1;
videoPlayer = new ApdevVideoPlayer(videoWidth, videoHeight, _loc_8);
videoPlayer.name = "video";
videoPlayer.controlsOverVideo = true;
videoPlayer.controlsAutoHide = true;
videoPlayer.autoPlay = true;
videoPlayer.x = thumbPadding;
videoPlayer.visible = false;
assetContainer.addChild(videoPlayer);
assetContainer.addChild(closeBtn);
assetContainer.addEventListener(MouseEvent.MOUSE_M OVE, overAsset);
assetContainer.addEventListener(MouseEvent.MOUSE_O VER, overAsset);
assetContainer.addEventListener(MouseEvent.MOUSE_O UT, outAsset);
closeBtn.buttonMode = true;
closeBtn.addEventListener(MouseEvent.CLICK, showGrid);
Tweener.addTween(closeBtn, {x:imageWidth * 0.5 - closeBtn.width * 0.5, y-imageHeight) * 0.5 - closeBtn.height * 0.5, time:0.4, transition:"easeOutSine"});
Tweener.addTween(nextBtn, {x:thumbPadding + imageWidth * 0.5, time:0.4, transition:"easeOutSine"});
Tweener.addTween(preBtn, {x-imageWidth) * 0.5 - thumbPadding, time:0.4, transition:"easeOutSine"});
addCaption();
ts = new TimeSlide(8, delay);
ts.addEventListener("slideStop", slideStopHandler);
addChild(ts);
var _loc_15:int;
ts.y = 32;
ts.x = _loc_15;
ts.visible = false;
resizeHandler();
return;
}// end function