Skip to main content
October 5, 2010
Question

Stopping key listener for component?

  • October 5, 2010
  • 1 reply
  • 533 views

I have a listener for the

arrow key strokes. When I select my clip the arrows work fine. However, there is also a slider on the stage. If I touch the slider the left and right keys

now adjust the slider, this is not desired. How to I prevent the slider from using the keyboard input?

Thanks

This topic has been closed for replies.

1 reply

Participating Frequently
October 5, 2010

Hi,

Checkout the preventDefault() method of KeyboardEvent.

Refer: http://board.flashkit.com/board/showthread.php?t=763237

Cheers

--Vikas

October 6, 2010

I didn't use the prevent default, couldn't get it to work. However on my up handler of the slider I just set the focus back to the stage and it see

med to be a good workaround.

Thanks!