I thought I had tried it, but browsercaching is also terrible here when debugging flex/flash applications...
init();
private function creationCompleteHandler():void
private function init():void { //... initWheelEvents(); }
// 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(); }
<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(); }
evt.preventDefault(); evt.stopImmediatePropagation();
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.