Instance of Symbol 26 MovieClip in Frame 1
//component parameters
onClipEvent (initialize) {
width = 141;
}
Symbol 26 MovieClip Frame 1
_parent.stop();
faderbackground._width = width;
looping = false;
playing = false;
top = knob._y;
bottom = knob._y;
left = knob._x;
faderWidth = faderbackground._width - knob._width;
segmentWidth = faderWidth / _parent._totalframes;
right = ((knob._x + faderWidth) - segmentWidth) + 1;
faderbackground._width = faderbackground._width - (segmentWidth - 1);
with (backing) {
_width = (Math.abs(_x) + faderbackground._width) + ((_height - faderbackground._height) / 2);
shadow._width = _width;
}
_parent.onEnterFrame = function () {
if ((_parent._currentframe == _parent._totalframes) && (!looping)) {
playing = false;
_parent.stop();
}
if (dragging) {
playing = false;
_parent.gotoAndStop(Math.ceil(knob._x / segmentWidth));
} else {
knob._x = (_parent._currentframe * segmentWidth) - segmentWidth;
}
playhilite._visible = playing;
loophilite._visible = looping;
};
loop.onRelease = function () {
loophilite._alpha = 100;
};
loop.onPress = function () {
looping = !looping;
loophilite._alpha = 0;
};
playButton.onPress = function () {
playhilite._alpha = 0;
};
playButton.onRelease = function () {
playhilite._alpha = 100;
playing = true;
_parent.play();
};
playButton.onDragOut = function () {
playhilite._alpha = 100;
};
playButton.onDragOver = function () {
playhilite._alpha = 0;
};
stopButton.onRelease = function () {
playing = false;
_parent.stop();
};
rewind.onRelease = function () {
playing = false;
_parent.gotoAndStop(1);
};
stepBack.onRelease = function () {
playing = false;
_parent.prevFrame();
};
stepForward.onRelease = function () {
playing = false;
_parent.nextFrame();
};
goToEnd.onRelease = function () {
playing = false;
_parent.gotoAndStop(_parent._totalframes);
};
knob.onPress = function () {
_parent.stop();
startDrag (knob, false, left, top, right, bottom);
dragging = true;
};
knob.onRelease = function () {
stopDrag();
dragging = false;
};