//mouse wheel delta code to adjust scroll speed
stage.addEventListener(MouseEvent.MOUSE_WHEEL,handleMouseWheel);
function handleMouseWheel(event:MouseEvent) {
if (active&&event.delta>0) {
scrollSpeed++;
} else if (active&&event.delta < 0) {
scrollSpeed--;
}
//}
}
Code above changes the scrolling speed of a text box. I would like to figure out how to combine the ctrlKey + MouseWheel to increase of decrease the font size.
From the Essential ActionScript 3.0 book by O'Reilly (pg. 563) and the CS4 help docs, it sounds like the ctrlKey state is already available and I just need to check for it by creating a listener. Then I would just need to add the conditions to the MouseEvent listener above. Is this correct?
OR..Do I need to create a var for the ctrlKey state and then check that var?
Thanks for the assist

New Topic/Question
Reply



MultiQuote




|