the loss of my mousewheel in Flash
One of few things that i dislike about a full flash site is the fact that i loose my mousewheel functionality as soon as the flash movie has focus (clicked on)
Today i made a little thingy that passes the scrollwheel functionality to the browser, using javascript.
Here's the code:
function _InitMouseWheel(){
mouseListener = new Object();
mouseListener.onMouseWheel = function(delta)
{
getURL("javascript:window.scrollBy(0,"+-(delta*30)+");");
}
Mouse.addListener(mouseListener);
}
then somewhere in your code add :
_InitMouseWheel();
You only have to call it once (because of the listener...)
enjoy!
Today i made a little thingy that passes the scrollwheel functionality to the browser, using javascript.
Here's the code:
function _InitMouseWheel(){
mouseListener = new Object();
mouseListener.onMouseWheel = function(delta)
{
getURL("javascript:window.scrollBy(0,"+-(delta*30)+");");
}
Mouse.addListener(mouseListener);
}
then somewhere in your code add :
_InitMouseWheel();
You only have to call it once (because of the listener...)
enjoy!
3 Comments:
you save my life with this trick !!
you make such a nice script by which both grid scrollers and page scrollers damn works fine! nice work man
nice solution :D!
Post a Comment
<< Home