Jump to content


Photo

my 1st mp3 player


  • Please log in to reply
73 replies to this topic

#61 dysfunktunal

dysfunktunal

    Young Padawan

  • Members
  • Pip
  • 17 posts

Posted 13 September 2005 - 02:49 AM

even the music???

#62 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 13 September 2005 - 03:17 AM

yes, even the music, what you can do also is define in the xml where the music is located..
But on the tutorial example is everything in the same folder.

Edited by funkysoul, 13 September 2005 - 03:17 AM.


#63 dysfunktunal

dysfunktunal

    Young Padawan

  • Members
  • Pip
  • 17 posts

Posted 13 September 2005 - 03:19 AM

ok and if there are ne spaces they need to be filled with _ right???

#64 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 13 September 2005 - 03:25 AM

yes...

#65 dysfunktunal

dysfunktunal

    Young Padawan

  • Members
  • Pip
  • 17 posts

Posted 13 September 2005 - 03:28 AM

ok well it still did tha same thing nd all tha stuff is in there...but with the original code on the tut there arent any errors but no music plays...

#66 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 13 September 2005 - 03:30 AM

1. Have you looked through the whole topic? There are some solutions for the most common problems
2. If there is no solution send the files to me and I will have a look.

Edited by funkysoul, 13 September 2005 - 03:31 AM.


#67 dysfunktunal

dysfunktunal

    Young Padawan

  • Members
  • Pip
  • 17 posts

Posted 13 September 2005 - 03:40 AM

ok well i cant find a problem and i dont wanna bother u so late so maybe tommorow...ya i just keep getting this thing that pops up but only wen i click play...nd the music isnt coming on at all...

#68 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 13 September 2005 - 03:42 AM

I have 10 am in switzerland :hi:
Just send me the stuff over and I will have a look at it

#69 dysfunktunal

dysfunktunal

    Young Padawan

  • Members
  • Pip
  • 17 posts

Posted 13 September 2005 - 03:44 AM

oo ok...wher do i send it to???

#70 Hooch

Hooch

    Young Padawan

  • Members
  • Pip
  • 158 posts
  • Location:Brockville, Ontario

Posted 16 September 2005 - 10:06 PM

Hey Funky. How is part III coming along?

Man, I am looking forward to it.

#71 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 17 September 2005 - 04:20 AM

slowly, but it's coming, I'm still fighting with some ID3 problems..

#72 Xiode

Xiode

    Young Padawan

  • Members
  • Pip
  • 4 posts

Posted 17 September 2005 - 01:13 PM

I was just looking at the example and I was wondering if there is any way to make the text scroll. Reason to that is there isn't going to be a very large area for the text.... This way I could constrain the demensions of it.

#73 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 17 September 2005 - 01:15 PM

Hi Xiode

That request have been placed already for the xxx time.. As you can see on my sig, part III of the mp3player tutorial will be released soon.. I'm working on that kind of things..

Please be patient, part III will be really big!

#74 Hooch

Hooch

    Young Padawan

  • Members
  • Pip
  • 158 posts
  • Location:Brockville, Ontario

Posted 24 May 2006 - 08:26 PM

Hi Funky.
I have no idea what's going on here, but I tried deleting the songstarter code.
The songs do not start when the player is loaded, but you have to hit next to
get the music to start. Hitting play does nothing.
Is this what is should be doing?

Here's my code
stop();
title_txt.autoSize = "left";
timeDisplay_txt.autoSize = "left";
toolTip._visible = false;
var amountLoaded:Number;
var duration:Number;

playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
	if (success) {
		_global.songname = [];
		_global.songband = [];
		_global.songFile = [];
		for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
		_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
		_global.songband[i] = playlist.firstChild.childNodes[i].attributes.band;
		_global.songFile[i] = playlist.firstChild.childNodes[i].attributes.File;
		attachMovie("butTemp","but"+i,i+50);
		eval("but"+i).id=i;
		_root["but"+i]._x = 5;
		_root["but"+i]._y = 40 + (i*15);
		_root["but"+i].but_txt.text = songname[i];
		if (i >= 3){
			_root["but"+i]._x = 160
			_root["but"+i]._y = -5 + (i*15);
		}
		_root["but"+i].onRelease = function(){
			clearInterval(timeInterval);
			_root.timeDisplay_txt.text = "00:00/00:00";

		}
	}
	}
	_root.createEmptyMovieClip("sound_mc", 1);
	_global.song_nr = random(songFile.length);

};

function timer(sound_obj) {
	time = sound_obj.position/1000;
	min = Math.floor(time/60);
	min = (min<10) ? "0"+min : min;
	sec = Math.floor(time%60);
	sec = (sec<10) ? "0"+sec : sec;
	timeDisplay_txt.text = min+":"+sec+"/"+totalDuration;
}
function duration (){
	timed = _root.sound_mc.sound_obj.duration/1000;
	mind = Math.floor(timed/60);
	mind = (mind<10) ? "0"+mind : mind;
	secd = Math.floor(timed%60);
	secd = (secd<10) ? "0"+secd : secd;
	totalDuration = mind+":"+secd;
}
MovieClip.prototype.songStarter = function(File, name, band) {
	if (this.sound_obj) {
		this.sound_obj.stop();
		delete this.sound_obj;
	}
	this.sound_obj = new Sound(this);
	this.sound_obj.loadSound(File, true);
	this.sound_obj.setVolume(100);
	this.onEnterFrame = function() {
		if (this.sound_obj.position>0) {
			delete this.onEnterFrame;
			timeInterval = setInterval(timer, 1000, this.sound_obj);
			this._parent.title_txt.text =name+" - "+band;
		} else {
			this._parent.title_txt.text = "loading...";
		}

	};			
	this.sound_obj.onSoundComplete = function() {
		clearInterval(timeInterval);
		_root.timeDisplay_txt.text = "00:00/00:00";
		(song_nr == songFile.length-1) ? _global.song_nr=0 : _global.song_nr++;
		_root.sound_mc.songStarter(songFile[song_nr], songname[song_nr], songband[song_nr]);
	};
	this._parent.volume1.dragger.onPress = function() {
		startDrag(this, true, 0, this._y, this._parent.volBG._width, this._y);
		_root.toolTip._visible = true;
		setInterval(draggableTip,100);
		function draggableTip(){
			_root.toolTip._x = _root._xmouse;
		}
		this.onEnterFrame = function() {
			var p = (this._x/this._parent.volBG._width)*100;
			this._parent._parent.sound_mc.sound_obj.setVolume(p);
			
		};
	};
	this._parent.volume1.dragger.onRelease = function() {
		delete this.onEnterFrame;
		stopDrag();
		
	};
	this._parent.volume1.dragger.onReleaseOutside = function() {
		_root.toolTip._visible = false;
		stopDrag();
		
	};
};

function soundStatus(){
	var amountLoaded = _root.sound_mc.sound_obj.getBytesLoaded() / _root.sound_mc.sound_obj.getBytesTotal();
	_root.loader.loadBar._width = amountLoaded * 260;
	duration = _root.sound_mc.sound_obj.duration;
	position = _root.sound_mc.sound_obj.position;
	_root.playHead._x = position / duration * 272 + 5;



}

btn_play.onRelease = function() {
	if (pause == true){ // no comment....
		this._parent.sound_mc.sound_obj.start(posiP) // start sound from the previously saved position
	}
	else {
	clearInterval(timeInterval);
	_root.timeDisplay_txt.text = "00:00/00:00";
	this._parent.sound_mc.songStarter(songfile[song_nr]);
	}
};
btn_pause.onRelease = function() { //pause button function
	this._parent.sound_mc.sound_obj.stop(); //stop the current sound
	posiP = _root.sound_mc.sound_obj.position / 1000; // save the current position in a new variable and divide by 1000 (ms -> sec)
	pause = true;//set the variable pause to true
};
btn_stop.onRelease = function() {
	clearInterval(timeInterval);
	_root.timeDisplay_txt.text = "00:00/00:00";
	this._parent.sound_mc.sound_obj.stop();
};
btn_next.onRelease = function() {
	clearInterval(timeInterval);
	_root.timeDisplay_txt.text = "00:00/00:00";
	(song_nr == songFile.length-1) ? _global.song_nr=0 : _global.song_nr++;
	_root.sound_mc.songStarter(songFile[song_nr], songname[song_nr], songband[song_nr]);
};
btn_prev.onRelease = function() {
	clearInterval(timeInterval);
	_root.timeDisplay_txt.text = "00:00/00:00";
	(song_nr == 0) ? _global.song_nr=songFile.length-1 : _global.song_nr--;
	_root.sound_mc.songStarter(songFile[song_nr], songname[song_nr], songband[song_nr]);
};
playlist.load("zenplayer/includes/playlist.xml");
setInterval(duration,100);
setInterval(soundStatus,100);

As usual, thanks man!
Hooch




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users