----- "Ian Wilkinson" <[EMAIL PROTECTED]> wrote: > Matthias Kramm wrote: > > > On Tue, Nov 04, 2008 at 11:05:30AM +0000, Ian Wilkinson > <[EMAIL PROTECTED]> wrote: > > > >>I can't produce a diff as I don't have the tools, but as it's only > >>actionscript I can send it over it you are interested. > > > > > > Yes, we're interested. Feel free to send the ActionScript. > > > > Hi, > > I've attached the code to this message, just place it after the > dragrefresh = setInterval(refreshDrag, 20);
Thanks, Ian. Nice patch. I had to make a minor mod. to get the prev page to work at no zoom - I believe the equivalent "Flash math" adjustment your code already had for the bottom. The line is shown below after your version. Jim > ....... > > Ian. > > -- > x10 via Web or Wap? > http://www.sgtwilko.f9.co.uk/bluelava/ > > //Arbitary amount to move page by when mouse scrolling, but feels > about right on all pdfs I've tested > var pageMove=40; > > var mouseListener = new Object(); //Create mouseListener to trap > scroll events. > mouseListener.onMouseWheel = function(delta) { > if (delta>0) { //Scrolling up > if (swf._y>=top){ //Either not zoomed, or at top of page **** if (swf._y>=(top-1)){ //Either not zoomed, or at top of page > if(pagenr > 1) { > pagenr = pagenr - 1; > swf._y=top-scrollyrange; //Goto bottom of page. > setPageNr(); > } > } else if ((top-(swf._y+pageMove))<0){ //don't over run the top > swf._y=top; > } else { > swf._y=swf._y+pageMove; > } > } else { //Scrolling down > if (swf._y<=(top-scrollyrange+1)) { //flash maths is always out, > so as long as we're within 1px of value we're at the bottom. > if(pagenr < swf._totalframes) { > pagenr = pagenr + 1; > swf._y=top; //goto top of new page > setPageNr(); > } > } else if ((top-(swf._y-pageMove))>(scrollyrange)){ //Don't > overrun the bottom. > swf._y=top-scrollyrange; > } else { > swf._y=swf._y-pageMove; > } > } > swfpos2scrollbars(); //update the scrollbars to show new scroll pos, > if changed. > }; > Mouse.addListener(mouseListener); //Attach mouseListener
