To fix the latest spambot problem, I have added a CAPTCHA to the posting form. I also had to delete the latest posts (post number 4078 and above). Sorry for the inconvenience. Please send suggestions and bug reports to mishu@mishu.eu.org. Thanks!
You are not logged in. home |

NOTE: If you don't have an account, just enter a username. One will be created automatically.

 

AS mp3 player

Posted by bardicknowledge on 05:04, 31 Jul 2007.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
stop();

ct=-1;
var sO:Sound = new Sound();
sO.onSoundComplete = playSong();
sO.setVolume(75);

var songXML:XML = new XML();
songXML.ignoreWhite = true;
songXML.onLoad = function(){
	playSong(cTrack());
}
songXML.load("data/songs.xml");

function playSong(cTrack){	
	sO.loadSound(songXML.firstChild.childNodes[cTrack].attributes.l,true);
	trackInfo.autoSize = "left";
	trackInfo.text = songXML.firstChild.childNodes[cTrack].attributes.a + " : " + songXML.firstChild.childNodes[cTrack].attributes.st;
	pausePlay.gotoAndStop(1);
	mute.gotoAndStop(1);
}

function cTrack(){
	ct++;
	if(ct==songXML.firstChild.childNodes.length){
		trace("wtf");
		ct=0;
	}
	trace(ct);
	return(ct);
}

function pauseIt(){
	pos = sO.position;
	sO.stop();
	pausePlay.gotoAndStop(4);
}

function unPauseIt(){
	sO.start(pos/1000);
	pausePlay.gotoAndStop(2);
}

//*********************************** BUTTONS ***********************************//

next.onRollOver = function(){
	this.gotoAndStop(2);
}

next.onRollOut = next.onReleaseOutside = function(){
	this.gotoAndStop(1);
}

next.onRelease = function(){
	playSong(cTrack());
}

pausePlay.onRollOver = function(){
	if(this._currentframe == 1) this.gotoAndStop(2);
	else this.gotoAndStop(4);
}

pausePlay.onRollOut = pausePlay.onReleaseOutside = function(){
	if(this._currentframe == 2) this.gotoAndStop(1);
	else this.gotoAndStop(3);
}

pausePlay.onRelease = function(){
	if(this._currentframe == 2) pauseIt();
	else unPauseIt();
}

mute.onRollOver = function(){
	if(this._currentframe == 1) this.gotoAndStop(2);
	else this.gotoAndStop(4);
}

mute.onRollOut = mute.onReleaseOutside = function(){
	if(this._currentframe == 2) this.gotoAndStop(1);
	else this.gotoAndStop(3);
}

mute.onRelease = function(){
	if(this._currentframe == 2) {
		sO.setVolume(0); 
		dragger.onEnterFrame = null;
		this.gotoAndStop(4);
	}else{
		sO.setVolume(75);
		dragger.onEnterFrame = true;
		this.gotoAndStop(2);
	}
}