This content has been marked as final.
Show 4 replies
-
1. Re: ScrollPane behavior
jeffbruce Apr 2, 2006 11:01 AM (in response to jeffbruce)Would somebody with the Flash authoring environment please try this? It should take you less than 2 minutes to try... -
2. Re: ScrollPane behavior
beesOnTarmac Jun 27, 2006 1:42 AM (in response to jeffbruce)Hello,
You've probably found a fix for this by now but I thought I'd pass on my workaround anyway. I emailed macromedia (well adobe now) and they said this is a known bug that they have no patch for. Anyway after a lot of swearing, forum searches, breaking things and sticking pins in scrollpane voodoo dolls I came up with this:
function scrollBugFix(targetPane)
{
var spListener:Object = new Object();
spListener.scroll = function(eventObject:Object):Void
{
var maxVPos:Number = eventObject.target.maxVPosition;
if (targetPane.vPosition == 0)
{
trace ("scroll - fixing top");
targetPane.vPosition = 0;
}
else if(targetPane.vPosition == maxVPos)
{
trace ("scroll - fixing bottom");
targetPane.vPosition = maxVPos;
}
};
// Add listener.
targetPane.addEventListener("scroll", spListener);
}
I've not done much coding and I don't really know why this works - seems a bit bizarre finding out if something is zero and if it is setting it to zero, but hey it worked for me so it might work for you.
cheers
chris -
3. Re: ScrollPane behavior
Jim Layher Sep 12, 2006 12:11 PM (in response to jeffbruce)I'm stumbling coming out of the blocks on my first project, hitting this exact same issue.
I can't this workaround to work for me but since I'm so green, I'm probably not placing it the right spot. Where hor how exactly should this code be incorporated?
Thanks for any help you can provide! -
4. Re: ScrollPane behavior
NishanthFlex Aug 21, 2012 4:17 AM (in response to Jim Layher)Solution For This
whenever you init the scroll pane, i mean in the first frame of the movie clip where you added the scroll pane component add a event listner for the scroll. the code should be like this
var scrollPaneListener = new Object();
scrollPaneListener.scroll = function(eventObject:Object):Void {
results_sp.invalidate();
};
results_sp.addEventListener("scroll", scrollPaneListener);This solves the problem. :-)
