Instance of Symbol 35 MovieClip "panel" in Frame 1
onClipEvent (load) {
playlist = [];
playlist[0] = "Swingle Singers - Star Wars.swf";
playlist[1] = "Phantom Planet - The Guest.swf";
playlist[2] = "Incubus - Aqueous Transmission.swf";
playlist[3] = "Jamiroquai - Virtual Insanity.swf";
playlist[4] = "BSU - Coney Island Baby.swf";
playlist[5] = "Chad Kroeger - Hero.swf";
playlist[6] = "Chronic Future - Come Correct.swf";
playlist[7] = "Theme - The Matrix.swf";
playlist[8] = "Am. Hi-Fi - Another Perfect Day.swf";
playlist[9] = "LostPr - Shinobi Vs Dragon Ninja.swf";
playonstart = "true";
repeat = "list";
shuffle = "true";
}
Symbol 8 Button
on (release) {
music.stop();
status = "pause";
}
on (rollOver, dragOver) {
bn_text = "pause";
}
on (rollOut, dragOut) {
bn_text = "";
}
Symbol 11 Button
on (release) {
if (index == 0) {
index = playlist.length - 1;
} else {
index--;
}
loadTrack(_parent.index);
status = "play";
}
on (rollOver, dragOver) {
bn_text = "previous track";
}
on (rollOut, dragOut) {
bn_text = "";
}
Symbol 14 Button
on (release) {
music.play();
status = "play";
}
on (rollOver, dragOver) {
bn_text = "play";
}
on (rollOut, dragOut) {
bn_text = "";
}
Symbol 17 Button
on (release) {
music.gotoAndStop(1);
status = "stop";
}
on (rollOver, dragOver) {
bn_text = "stop";
}
on (rollOut, dragOut) {
bn_text = "";
}
Symbol 19 Button
on (press) {
startDrag ("");
}
on (release) {
stopDrag();
}
Symbol 22 Button
on (release) {
unloadMovie ("_root.panel");
stopAllSounds();
}
Symbol 23 Button
on (release) {
if (index == (playlist.length - 1)) {
index = 0;
} else {
index++;
}
loadTrack(_parent.index);
status = "play";
}
on (rollOver, dragOver) {
bn_text = "next track";
}
on (rollOut, dragOut) {
bn_text = "";
}
Symbol 29 Button
on (press) {
pressing = true;
gotoAndPlay (3);
}
on (rollOut, release, releaseOutside) {
pressing = false;
}
Symbol 31 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 1
function getRange() {
if (dir == "cw") {
if (minRot < maxRot) {
range = maxRot - minRot;
} else {
range = (maxRot + 360) - minRot;
}
} else if (maxRot < minRot) {
range = minRot - maxRot;
} else {
range = (minRot + 360) - maxRot;
}
}
function setDots() {
Limiter1._rotation = minRot;
Limiter1.text = minValue;
Limiter2._rotation = maxRot;
Limiter2.text = maxValue;
if (180 < minRot) {
Limiter1.gotoAndStop(2);
} else {
Limiter1.gotoAndStop(1);
}
if (180 < maxRot) {
Limiter2.gotoAndStop(2);
} else {
Limiter2.gotoAndStop(1);
}
}
function init(val) {
var initRatio = ((val - minValue) / (maxValue - minValue));
if (dir == "cw") {
rawAngle = (minRot + (range * initRatio)) % 360;
} else {
rawAngle = (minRot - (range * initRatio)) % 360;
if (rawAngle < 0) {
rawAngle = rawAngle + 360;
}
}
turn(rawAngle);
}
function getAngle() {
theta = Math.atan2(_xmouse, -_ymouse);
rawAngle = (theta * 180) / Math.PI;
if (0 >= rawAngle) {
rawAngle = rawAngle + 360;
}
}
function convertAngle(angle) {
var adjAngle;
if (dir == "cw") {
adjAngle = angle - minRot;
} else {
adjAngle = minRot - angle;
}
if (adjAngle < 0) {
adjAngle = adjAngle + 360;
}
return(adjAngle);
}
function turn(angle2) {
curVal = ((convertAngle(angle2) / range) * (maxValue - minValue)) + minValue;
Text.text = Math.round(curVal);
Indicator.text = Math.round(curVal);
if (180 < angle2) {
Indicator.gotoAndStop(1);
} else {
Indicator.gotoAndStop(2);
}
Indicator._rotation = angle2;
}
function adjust() {
if (pressing == true) {
getAngle();
if (range < convertAngle(rawAngle)) {
freeze = true;
}
if (freeze != true) {
turn(rawAngle);
lastValidDeg = rawAngle;
} else if (convertAngle(lastValidDeg) < (range / 2)) {
if ((range / 2) < convertAngle(rawAngle)) {
turn(minRot);
} else {
freeze = false;
turn(rawAngle);
}
} else if ((convertAngle(rawAngle) < (range / 2)) || (range < convertAngle(rawAngle))) {
turn(maxRot);
} else {
freeze = false;
turn(rawAngle);
}
} else {
freeze = false;
gotoAndStop (2);
}
}
function build() {
getRange();
setDots();
init(curVal);
}
getRange();
setDots();
init(initValue);
Symbol 34 MovieClip Frame 2
stop();
Symbol 34 MovieClip Frame 3
adjust();
custom();
Symbol 34 MovieClip Frame 4
adjust();
gotoAndPlay (3);
Symbol 35 MovieClip Frame 1
function loadTrack(index) {
if (shuffle) {
this.music.loadMovie(this.playlist[this.sh[this.index]]);
} else {
this.music.loadMovie(this.playlist[this.index]);
}
this.loader._xscale = 0.1;
this.playhead._xscale = 0.1;
}
function shuffleTracks() {
sh = new Array();
i = 0;
while (i < playlist.length) {
sh[i] = "Z";
i++;
}
var i = 0;
while (i < playlist.length) {
rn = Math.round(random(playlist.length - 1));
while (sh[rn] != "Z") {
rn++;
if (rn >= playlist.length) {
rn = 0;
}
}
sh[rn] = i;
i++;
}
}
function loadTrack(index) {
this.music.loadMovie(this.playlist[this.index]);
this.loader._xscale = 0.1;
this.playhead._xscale = 0.1;
}
index = 0;
shuffle = false;
repeat = 0;
index = 0;
shuffle = false;
value = curVal;
repeat = 0;
stop();
Instance of Symbol 4 MovieClip "loader" in Symbol 35 MovieClip Frame 1
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse)) {
a = _parent.music._totalframes / 157;
_parent.music.gotoAndPlay(int(a * _xmouse));
}
}
Instance of Symbol 24 MovieClip "controller" in Symbol 35 MovieClip Frame 1
onClipEvent (load) {
if (_parent.playonstart == "true") {
_parent.status = "play";
_parent.LoadTrack(_parent.index);
songname = substring(_parent.playlist[_parent.index], 1, length(_parent.playlist[_parent.index]) - 4);
_parent.song = songname;
}
snd = new Sound(_root);
_parent.shuffleTracks();
_parent.bn_text = "";
}
onClipEvent (enterFrame) {
songname = substring(_parent.playlist[_parent.index], 1, length(_parent.playlist[_parent.index]) - 4);
_parent.song = songname;
_parent.playfr = _parent.music._currentframe;
playtime = int(_parent.playfr / 10);
min = int(playtime / 60);
sec = playtime - (min * 60);
sec = ((sec < 10) ? ("0" add String(sec)) : (String(sec)));
min = ((min < 10) ? ("0" add String(min)) : (String(min)));
_parent.playhead._xscale = (100 / _parent.music._totalframes) * _parent.music._currentframe;
_parent.loadedfr = this.music._framesloaded;
_parent.loader._xscale = (100 / _parent.music._totalframes) * _parent.music._framesloaded;
snd.setVolume(_root.panel.BigDial.curVal);
if (_parent.volume.drag) {
_parent.info = ("volume:" add Math.round(_root.panel.BigDial.curVal)) add "%";
} else if (_parent.pan.drag) {
_parent.info = ("pan:" add Math.round((_parent.pan.value * 2) - 100)) add "";
} else if (_parent.bn_text != "") {
_parent.info = _parent.bn_text;
} else {
_parent.info = ((("playtime [" add min) add ":") add sec) add "]";
}
if (_parent.playfr == _parent.music._totalframes) {
if (_parent.repeat == 0) {
} else if (_parent.repeat == 1) {
if (_parent.index == (_parent.playlist.length - 1)) {
_parent.index = 0;
} else {
_parent.index++;
}
_parent.loadTrack(_parent.index);
} else if (_parent.repeat == 2) {
_parent.music.gotoAndStop(1);
_parent.status = "stop";
}
}
updateAfterEvent();
}
Instance of Symbol 34 MovieClip "BigDial" in Symbol 35 MovieClip Frame 1
onClipEvent (load) {
function custom() {
_root.curVal = curVal;
}
minRot = 200;
maxRot = 160;
dir = "cw";
minValue = 0;
maxValue = 100;
initValue = 100;
Text._visible = true;
_root.curVal = initValue;
}