hey whats going on everybody? im having a little problem with my flash site im trying to build. inside my site i have a scroll box that loads data from a xml file, i set the mask and scroll bar of the scroll box to stage.height and it works perfectly, but here comes the problem, the scroll bar that you drag in order to display more data goes past the stage height. right here is a example of whats going on. www.directcorner.com/rp/est.html
and here is the code inside the scrollbox:
Stage.align = “TL”;
Stage.scaleMode = “noScale”;
stop ();
scrollBar._height = Stage.height;
toScroll = “item_mc”;
scroll_mc.setMask(mask_mc);
mask_mc._height = Stage.height;
sizeListener = new Object();
sizeListener.onResize = function() {
mask_mc._height = Stage.height;
scrollBar._height = Stage.height;
};
Stage.addListener(sizeListener);
for (i = 0; i < total; i++)
{
scroll_mc.item_mc.item.duplicateMovieClip(“item” + i, i);
scroll_mc.item_mc[“item” + i]._y = scroll_mc.item_mc[“item” + i]._height * i;
scroll_mc.item_mc[“item” + i].headline_txt.text = headline*;
scroll_mc.item_mc[“item” + i].date_txt.text = date*;
scroll_mc.item_mc[“item” + i].intro_txt.text = copy_intro*;
scroll_mc.item_mc[“item” + i].intro_txt.html = true;
scroll_mc.item_mc[“item” + i].intro_txt.htmlText = copy_intro*;
loadMovie(image_thumb*, scroll_mc.item_mc[“item” + i].holder);
scroll_mc.item_mc[“item” + i].holder._alpha = 0;
scroll_mc.item_mc[“item” + i].image_large = image_large*;
scroll_mc.item_mc[“item” + i].copy_txt.text = copy_full*;
scroll_mc.item_mc[“item” + i].copy_txt.html = true;
scroll_mc.item_mc[“item” + i].copy_txt.htmlText = copy_full*;
} // end of for
scrollTween = 5;
scrollSpeed = 6;
scrollBttn.originY = scrollBttn._y;
scrollBttn.originX = scrollBttn._x;
scrollBttn.maxY = scrollBar._height - scrollBttn._height + scrollBttn.originY;
scroll_mc.originY = scroll_mc._y;
var mouseListener = new Object();
mouseListener.onMouseWheel = function (wheelNum)
{
if (scrollBttn._y >= scrollBttn.originY)
{
scrollBttn._y = scrollBttn._y - wheelNum / scrollRatio * scrollSpeed;
if (scrollBttn._y < scrollBttn.originY)
{
scrollBttn._y = scrollBttn.originY;
}
else if (scrollBttn._y > scrollBttn.originY + scrollBar._height - scrollBttn._height)
{
scrollBttn._y = scrollBttn.originY + scrollBar._height - scrollBttn._height;
} // end if
} // end else if
};
Mouse.addListener(mouseListener);
onEnterFrame = function ()
{
scrollRatio = scroll_mc[toScroll]._height / scrollBar._height;
ratio = (scroll_mc[toScroll]._height - scrollBar._height) / (scrollBar._height - scrollBttn._height);
if (scroll_mc[toScroll]._height > scrollBar._height)
{
destScroll = (-scrollBttn._y + scroll_mc.originY) * ratio + scroll_mc.originY;
scroll_mc._y = scroll_mc._y + Math.round((destScroll - scroll_mc._y) / scrollTween);
} // end if
};
stop ();
idk maybe im doing something wrong but can someone please help me. thanks