You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

constant scrolling speed Created Sep 21, 2009

This thread is solved

Views: 6017     Replies: 8     Last reply Dec 22, 2011  
You must login first before you can use this feature

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

constant scrolling speed

Posted: Sep 21, 2009

I have a scrollable of size: 1 and try to scroll at the same speed regardless of how many pages are traversed to get to the seek target (more like what I understand by speed: distance / time).


$("#sc").scrollable({
  size: 1,
  onBeforeSeek: function (e, i) {
    var c = this.getIndex(); // also tried this.getPageIndex();
    this.getConf().speed = (Math.max(c, i) - Math.min(c, i)) * 200;
    // console.log(this.getConf().speed);
  }
});

Even though the desired dynamic speed is logged onBeforeSeek, it only applies for the next seek which sort of defeats the whole purpose ;-(

Any ideas what as to what I am missing? I also tried this.reload(), but it didn't have any effect (and is perhaps useless inside a configured event).

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» constant scrolling speed

Posted: Sep 22, 2009

Reply to: constant scrolling speed, from blacktrash
if you look at the scrollable source code you can see that the scrolling time is determined before the onBeforeSeek event making it impossible to change it.

I need to change the behaviour for the next release since you have a very good idea here. Thank you for the suggestion!

Christian Ebert
Flowplayer support

Posts: 2803

Registered:
May 27, 2008

» » constant scrolling speed

Posted: Oct 8, 2009

Reply to: » constant scrolling speed, from tipiirai
Thanks for implementing this in the new release! Surprise, surprise: it works ;-)

Rulfer

Posts: 4

Registered:
Nov 14, 2009

How was this implemented?

Posted: Mar 24, 2011

Reply to: » » constant scrolling speed, from blacktrash
Sorry, I surely missed something here. I do need smooth horizontal scrolling with the same speed independent of the distance between items. I can't for the love of it find any way to control this. In other words: Heeeeeeelp !!!