What is AutoScroll12.as?
if you want to trap all mouse event inside your container use this method
container.mouseChildren = false;
container.mouseEnabled = false;
this action trap all the mouse listeners
Thanks for your reply.
I just want to make sure I understand it. Will this allow me to pass all mouse events to the system? When I'm in AutoScroll.as I trap all events, but I want to pass on any mouse events (jump out of the script) while still processing keyboard events, especially the tab key.
I'm not really sure what you're asking. mouseEvent bubbles so you should always be able to catch children being moused. Instead of CLICK, you might want to work with MOUSE_DOWN and MOUSE_UP
Flex SDK Developer
Adobe Systems Inc.
Sorry for this late reply. I was able to fix that problem and will discuss it here so others don't have to go though what I did. As usually happens, you fix one thing and a new problem results. Those will go in their own thread, however.
Within the AutoScroll.as class I coudln't trap mouse events and therefore ignore them relative to that class. That class was designed to allow the user to move around the form using the keyboard. The problem was that if you tabbed down, you would eventually tab beyond what you can see on the screen. AutoScroll would move the view port so the tabbed field would be visible.
If you used the mouse to scroll down, AutoScroll would force the screen back so that whatever field last had focus would remain on the screen. You choice was either allow keyboard or mouse movement.
AutoScroll.as was invoked from within the Application tag. It was caused by either a change or focus event. I removed the change and put in a scroll event. Within AutoScroll.as I could now check if it were a Scroll event and if it were just leave the function. Thus if you mouse down AutoScroll ignores (lets bubble up) the event and if you keyboard down it grabs it and moves the view port if needed.