[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] rfxview updated for mouse scrolling.
From: |
jhb01 |
Subject: |
Re: [Swftools-common] rfxview updated for mouse scrolling. |
Date: |
Thu, 6 Nov 2008 02:55:01 +0000 (GMT) |
----- "Ian Wilkinson" <address@hidden> wrote:
> Matthias Kramm wrote:
>
> > On Tue, Nov 04, 2008 at 11:05:30AM +0000, Ian Wilkinson
> <address@hidden> 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
- [Swftools-common] rfxview updated for mouse scrolling., Ian Wilkinson, 2008/11/04
- Re: [Swftools-common] rfxview updated for mouse scrolling., Matthias Kramm, 2008/11/04
- Re: [Swftools-common] rfxview updated for mouse scrolling., Ian Wilkinson, 2008/11/04
- Re: [Swftools-common] rfxview updated for mouse scrolling., Matthias Kramm, 2008/11/04
- Re: [Swftools-common] rfxview updated for mouse scrolling., peter kostov, 2008/11/05
- Re: [Swftools-common] rfxview updated for mouse scrolling., Ian Wilkinson, 2008/11/05
- Re: [Swftools-common] rfxview updated for mouse scrolling., peter kostov, 2008/11/05
- Re: [Swftools-common] rfxview updated for mouse scrolling., Matthias Kramm, 2008/11/06
- Re: [Swftools-common] rfxview updated for mouse scrolling.,
jhb01 <=