i’m using "iloveitaly"s easing scrollbar class, and it works great. however, i added an effect that i want on my scrollbar, and it doesnt work quite how it should. what should happen is when u press the dragger, it should duplicate itself and then fade out, giving it kinda a “mouse trail” type effect i guess you can call it. anyway, here is the code for the part in the class that doesnt work:
private function onPress() {
startDrag(this, false, lockPos[0], lockPos[1], lockPos[2], lockPos[3])
// this is where the code that doesnt work starts
this.onEnterFrame = function() {
var nextDepth = this._parent.getNextHighestDepth();
var dupe = this.duplicateMovieClip("dupe" + nextDepth, nextDepth);
dupe._x = this._x;
dupe._y = this._y;
dupe.onEnterFrame = function() {
this._xscale -= 10;
this._yscale -= 10;
this._alpha -= 10;
if (this._xscale <= 0) {
this.removeMovieClip();
}
};
};
// this is where the code that doesnt work stops
}
as u can see by the comments, if i take out that block of code, everything works fine. but if i leave it in for the desired effect, it duplicates the clips, but they end up staying on the canvas (some of them disappear, some dont) and then when i release-click again, i’m grabbing the duplicated instances and it no longer scrolls. i’m not very familiar with coding inside of class files, but if i use that code in a separate file, it did exactly what i wanted. any help is greatly appreciated. thanks in advance.