[bugfix] Make sliding speed configable

my previous patch was not correct. Inner class can't have static member. 

tested case:
setSpeed(0); // no effect, keep last speed
setSpeed(0.1f);  // slow
setSpeed(1000000000000000.0f);  // very very fast