Combined Code
frame 1 {
stop();
}
frame 1 {
function soundPlayer() {
_root.np = 'Now playing: [' + tune + '/' + '12]' + '<br><b>' + songName + '<b>';
if (_root.mouseUp == 1) {
sPosition = Song.position;
Song.stop();
Song.setVolume(50);
Song.start(Math.ceil(_root.seekmouse));
delete _root.mouseUp;
}
timeLimit = Song.position / 999;
seconds = Math.abs(Math.floor(timeLimit - min * 60));
seconds1 = Math.abs(Math.floor(seconds / 10));
min = Math.abs(Math.floor(timeLimit / 60));
seconds2 = Math.abs(seconds - seconds1 * 10);
totalTimer = min + ':' + seconds1 + '' + seconds2;
Song.onSoundComplete = function () {
++tune;
if (tune == 2) {
Song.attachSound('song2');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Maybe One Day';
} else {
if (tune == 3) {
Song.attachSound('song3');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Black and Blue life';
} else {
if (tune == 4) {
Song.attachSound('song4');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'I wish you knew';
} else {
if (tune == 5) {
Song.attachSound('song5');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Hungry for toast';
} else {
if (tune == 6) {
Song.attachSound('song6');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Hate being denied';
} else {
if (tune == 7) {
Song.attachSound('song7');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Not a lot of effort';
tune = 7;
} else {
if (tune == 8) {
Song.attachSound('song8');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'I want her back';
} else {
if (tune == 9) {
Song.attachSound('song9');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Wash over me';
} else {
if (tune == 10) {
Song.attachSound('song10');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Guitar thing';
} else {
if (tune == 11) {
Song.attachSound('song11');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Pull up game';
} else {
if (tune == 12) {
Song.attachSound('song13');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Retired smoker';
} else {
if (tune == 13) {
Song.attachSound('song1');
soundTimer = Song.position;
soundDuration = Song.duration;
Song.start();
songName = 'Chew the bamboo';
tune = 1;
}
}
}
}
}
}
}
}
}
}
}
}
};
if (mp3Start == null) {
trace('soundPlayer');
Song = new Sound();
Song.attachSound('song1');
trace(Math.ceil(Song1.duration / 2 / 1000));
Song.start();
songName = 'Chew the Bamboo';
Song.setVolume(50);
tune = 1;
mp3Start = 1;
_root.playingMusic = 1;
}
}
}
frame 1 {
_root.onEnterFrame = function () {
_root._xscale = 145;
_root._yscale = 145;
soundPlayer();
};
}
movieClip 16 {
}
movieClip 17 {
}
movieClip 18 {
}
movieClip 20 {
}
movieClip 21 {
}
movieClip 24 {
}
movieClip 26 {
}
movieClip 29 {
}
movieClip 31 {
}
movieClip 32 {
}
movieClip 52 {
}
button 57 {
on (press) {
m = 1;
mouseHit = 1;
}
on (release, releaseOutside, rollOut) {
delete m;
delete mouseHit;
}
}
movieClip 59 {
}
button 67 {
on (press) {
status = 'Play';
_root.buttons = 1;
if (_root.playingMusic == null) {
_root.buttons = 1;
_root.Song.stop();
_root.Song.start(_root.Song.position / 1000);
_root.playingMusic = 1;
}
}
}
button 71 {
on (press) {
_root.buttons = 1;
_root.ff = 1;
}
on (release, releaseOutside) {
_root.status = 'Play';
_root.moviebg.play();
delete _root.ff;
}
}
button 75 {
on (press) {
_root.rew = 1;
_root.buttons = 1;
}
on (release, releaseOutside) {
_root.status = 'Play';
_root.moviebg.play();
delete _root.rew;
}
}
button 79 {
on (press) {
status = 'Stop';
delete _root.ff;
delete _root.rew;
_root.buttons = 1;
delete _root.playingMusic;
_root.sPosition = _root.Song.position;
_root.Song.stop();
}
}
movieClip 82 {
}
movieClip 83 {
instance of movieClip 59 {
onClipEvent (enterFrame) {
if (_parent.mouseHit == 1) {
this._x = _root._xmouse;
this._visible = true;
} else {
this._visible = false;
}
}
}
}
instance seekbar of movieClip 83 {
onClipEvent (mouseDown) {
if (_root.seekbar.hitTest(_root._xmouse, _root._ymouse, true)) {
} else {
delete _root.buttons;
}
if (doubleClick >= 2) {
delete doubleClick;
} else {
if (_root.buttons == null) {
++doubleClick;
}
}
}
onClipEvent (load) {
movie = new Color(_root);
shade = new Object();
value = 50;
shade = {'ra': value, 'rb': '0', 'ga': value, 'gb': 0, 'ba': value, 'bb': '0', 'aa': '100', 'ab': '0'};
noshade = {'ra': '100', 'rb': '0', 'ga': '100', 'gb': 0, 'ba': '100', 'bb': '0', 'aa': '100', 'ab': '0'};
status = '';
}
onClipEvent (enterFrame) {
if (_root.rew == 1) {
if (_root.moviebg._currentframe < 5) {
_root.moviebg.gotoAndStop(_root.moviebg._totalframes);
} else {
_root.moviebg.gotoAndStop(_root.moviebg._currentframe - 3);
}
_root.buttons = 1;
status = 'REW';
_root.Song.stop();
_root.Song.start(_root.Song.position / 1000 - 5);
} else {
if (_root.ff == 1) {
movie.setTransform(noshade);
_root.moviebg.gotoAndPlay(_root.moviebg._currentframe + 1);
_root.buttons = 1;
status = 'FF';
_root.Song.stop();
if (Math.abs(_root.Song.position - _root.Song.duration) < 10000) {
trace('HW');
_root.Song.start(_root.Song.position / 1000);
delete _root.ff;
} else {
_root.moviebg.gotoAndPlay(_root.moviebg._currentframe + 1);
_root.Song.start(_root.Song.position / 1000 + 6);
}
} else {
if (status == 'Stop') {
_root.sPosition = _root.Song.position;
delete playingMusic;
_root.Song.stop();
movie.setTransform(shade);
_root.moviebg.stop();
} else {
if (status == 'Play') {
movie.setTransform(noshade);
_root.moviebg.play();
} else {
if (!status == 'Stop') {
_root.moviebg.play();
}
if (_root.playingMusic == 1) {
movie.setTransform(noshade);
}
if (_root.playingMusic == null && status == 'FF') {
movie.setTransform(noshade);
status = 'Play';
}
if (_root.playingMusic == null && status == 'REW') {
movie.setTransform(noshade);
status = 'Play';
}
if (_root.playingMusic == null && !status == 'Stop') {
movie.setTransform(noshade);
if (status == 'Play') {
_root.Song.start(_root.Song.position / 1000);
_root.playingMusic = 1;
}
}
}
}
}
}
if (statusTimer >= 50) {
status = '';
delete statusTimer;
} else {
++statusTimer;
}
_root.tests = doubleClickTimer;
if (doubleClick >= 2) {
if (movie_stop == true) {
if (_root._ymouse >= 350) {
_root.music.gotoAndStop(formula);
_root.seekbar.head._x = _root._xmouse;
}
status = 'Play';
delete statusTimer;
if (_root.playingMusic == null) {
_root.Song.start(_root.Song.position / 1000);
_root.playingMusic = 1;
}
delete movie_stop;
} else {
status = 'Stop';
delete statusTimer;
_root.music.stop();
movie_stop = true;
delete _root.playingMusic;
}
delete doubleClick;
delete doubleClickTimer;
} else {
if (doubleClick >= 1) {
if (doubleClickTimer >= 10) {
delete doubleClick;
delete doubleClickTimer;
} else {
++doubleClickTimer;
}
}
}
fps = 25;
if (second == null) {
second = 0;
min = 0;
ten = 0;
}
timeLimit = _root.Song.position / 999;
seconds = Math.abs(Math.floor(timeLimit - min * 60));
seconds1 = Math.abs(Math.floor(seconds / 10));
min = Math.abs(Math.floor(timeLimit / 60));
seconds2 = Math.abs(seconds - seconds1 * 10);
_root.debugT = _root.Song.position - (min * 60 * 1000 + seconds * 1000);
milsec = _root.Song.position - (min * 60 * 1000 + seconds * 1000);
totalTimer = min + ':' + seconds1 + '' + seconds2 + milsec;
_root.playTimer = min + ':' + seconds1 + '' + seconds2 + ':' + milsec;
formula = Math.ceil(_root._xmouse * _root.Song.position / 550);
if (_root.seekbar.head.hitTest(_root._xmouse, _root._ymouse, true) && _root.seekbar.m == 1) {
_root.seekbar.mouseHit = 1;
_root.seekbar.head._x = _root._xmouse;
_root.seekmouse = Math.ceil(_xmouse * _root.Song.duration / 550 / 1000);
_root.mouseUp = 1;
} else {
if (_root.seekbar.head.hitTest(_root._xmouse, _root._ymouse, false)) {
delete _root.seekbar.mouseHit;
delete _root.playingMusic;
}
}
if (_root.seekbar.mouseHit == 1) {
_root.seekbar.head.gotoAndStop(3);
status = 'Stop';
delete statusTimer;
if (_root.seekbar.head._x < 0) {
_root.seekbar.head._x = 0;
delete _root.seekbar.mouseHit;
} else {
if (_root.seekbar.head._x > 539) {
_root.seekbar.head._x = 539;
delete _root.seekbar.mouseHit;
} else {
_root.seekbar.head._x = _root._xmouse;
_root.seekmouse = Math.ceil(_root._xmouse * _root.Song.duration / 550 / 1000);
_root.mouseUp = 1;
stopAllSounds();
delete playMusic;
}
}
} else {
if (_root.music._currentframe == _root.music._totalframes) {
if (_root._currentframe >= _root._totalframes) {
_root.gotoAndStop(1);
} else {
if (_root._currentframe < _root._totalframes) {
_root.nextFrame();
}
}
}
if (playMusic == null) {
_root.Song.start(_root.Song.position / 1000);
_root.music.gotoAndPlay(_root.music._currentframe);
status = 'Play';
delete statusTimer;
playMusic = 1;
}
_root.seekbar.head._x = _root.Song.position * 550 / _root.Song.duration;
}
}
}