evt.preventDefault(); evt.stopImmediatePropagation();
<s:Application ......... creationComplete="init();"> ...... private function init() : void{ mapManager.map.addEventListener(MouseEvent.MOUSE_WHEEL,onMouseWheel,false,0); } private function onMouseWheel(evt:MouseEvent):void{ evt.preventDefault(); evt.stopPropagation(); }
// inside ViewerContainer.mxml <Script> tag /** * Listen creation complete handler */ private function init(): { //... initWheelEvents(); } /** * Init mouse wheel events listeners */ protected function initWheelEvents():void { if (mapManager && mapManager.map) { mapManager.map.addEventListener(MouseEvent.ROLL_OVER, mouseWheelOver); mapManager.map.addEventListener(MouseEvent.ROLL_OUT, mouseWheelOut); } } /** * mouse wheel out handler */ protected function mouseWheelOut(event:MouseEvent):void { MouseWheel.release(); } /** * mouse wheel over handler */ protected function mouseWheelOver(event:MouseEvent):void { MouseWheel.capture(); }
private function init():void { //... initWheelEvents(); }
init();
private function creationCompleteHandler():void
I thought I had tried it, but browsercaching is also terrible here when debugging flex/flash applications...
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.