How to prevent browser scroll when scroll in flash

2 posts

Flag Post

I test a part of code in my computer, works good, but not WORKING in kongregate…how to solve this problem? Anyone evey met this?

 
Flag Post

<!-- disables browser mouse scrolling -->

if(window.addEventListener){
window.addEventListener(‘DOMMouseScroll’,wheel,false);
}

function wheel(event)
{
event.preventDefault();
event.returnValue=false;
}
window.onmousewheel=document.onmousewheel=wheel;

I have “extracted” this function from the Flash MouseWheelTrap which can be found here: http://code.google.com/p/mousewheeltrap/