PDA

View Full Version : [AS3] "Stopped drag" event for scrollPane


tohihaho
12-03-2008, 04:14 PM
Hi all.
I have a movieClip "inside" a scrollPane.
I have set the scrollDrag parameter to true, so that the content of the scrollPane could be dragged.
I have to do something when the drag is finished. I didn't find an event of the scrollPane that is dispatched in such situation and the mouseDown, mouseUp events (which should be inherited from InteractiveObject) don't work :confused:
Here is some code:

scrollPanel.scrollDrag = true;
var spListener:Object = new Object();
spListener.mouseUp = function()
{
texta.text += "mouseUp\n";
}
scrollPanel.content.addEventListener("mouseUp", spListener);

scrollPanel is the scrollPane instance, which contentPath is set to the movieClip.
I forgot to mention that I'm doing this in Flash.
Will appreciate some help :rolleyes: