Scrollspeed (number of nodes)

MovieClip.prototype.easeY = function(y) {
this.onEnterFrame = function() {
this._y = y-(y-this._y)/1.2;
if (Math.abs(y-this._y)<=1) {
delete this.onEnterFrame;
this._y = y;
}
};
};

let’s say that I’ve variable numbers of nodes in different categories,
is there a way control this?
for instance if nodes are less than 4 I don’t want it to scroll at all, if 10 i want a certain scrollspeed, and 20 another and so on…

have a nice day. Tonni