manojmathew
11-18-2005, 02:12 PM
Is it possible to disable scrolling by keys and mouse wheel in a scroll pane...?
This is creating a lot of headache in one of my projects. When ever the scrollpane has focus and any event from arrow keys or mouse wheel occures, the content of the scroll pane is moving.
I have added a listener object which catches all events from LEFT, RIGHT, TOP, and DOWN arrow keys and mouse wheel and used the Selection.setFocus(null) on this event. It is working almost fine except for mouse wheel. If the mouse is on the scrollpane mousewheel scrolls the content. I have used another method to prevent this. In the onEnterFrame event of the scrollopane content, I wrote the following code.
if(this._x!=0){
this._x=0;
}
if(this._y!=0){
this._y=0;
}
Again the problem is that it creates a small jerking. The scrollpane will scroll actually and after scrolling the movieclip detects the position and then restore it to 0;
Any other method to do this...?????
This is creating a lot of headache in one of my projects. When ever the scrollpane has focus and any event from arrow keys or mouse wheel occures, the content of the scroll pane is moving.
I have added a listener object which catches all events from LEFT, RIGHT, TOP, and DOWN arrow keys and mouse wheel and used the Selection.setFocus(null) on this event. It is working almost fine except for mouse wheel. If the mouse is on the scrollpane mousewheel scrolls the content. I have used another method to prevent this. In the onEnterFrame event of the scrollopane content, I wrote the following code.
if(this._x!=0){
this._x=0;
}
if(this._y!=0){
this._y=0;
}
Again the problem is that it creates a small jerking. The scrollpane will scroll actually and after scrolling the movieclip detects the position and then restore it to 0;
Any other method to do this...?????