Here's a tweaked version of the viewport from my own version with the feature included. The code should be similar to the official version, if you have any probs, feel free to email me.
ViewPort.prototype.scrollUp=function(ms) {this.scrollSlide(null,0,ms);};
ViewPort.prototype.scrollDown=function(ms) {this.scrollSlide(null,-this.availableScrollY);};
ViewPort.prototype.scrollLeft=function(ms) {this.scrollSlide(0,null,ms);};
ViewPort.prototype.scrollRight=function(ms) {this.scrollSlide(-this.availableScrollX,null);};
ViewPort.prototype.scrollSlide = function(x,y,ms) {
if (x!=null && this.enableHScroll) {
this.invokeEvent("scrollstart");
this.contentPane.slideTo(x,this.contentPane.y,null,ms);
} else if (y!=null && this.enableVScroll)
{
this.invokeEvent("scrollstart");
this.contentPane.slideTo(this.contentPane.x,y,null,ms);
};
};
Stellan Kristiansson wrote:
Hello
Thanks for a great API. I wonder if there is any possibility to control the speed when using a viewport for scrolling up and down. In sliteTo you can specify this and it would be great to be able to do it in this funktion to. I think the speed is to fast.
Best Regard Stellan
Stellan Kristiansson
Senior Creative Designer
Direct: +46 (0)40 631 14 39
Mobile: +46 (0)709 31 14 39P R I M I X
Primix Sweden AB
Jörgen Kocksgatan 4
SE-211 20 Malmö
Phone +46 (0)40-30 14 80
Fax +46 (0) 30 14 40www.primix.se
--
Michael Pemberton
[EMAIL PROTECTED]
ICQ: 12107010
