I was wondering if it was possible to have the song name and band scroll up instead of scrolling left? And maybe have it stop when it gets to the song name, scroll up and stop to show the band name.
mp3 player
Started by AnTone Media, Feb 28 2007 03:54 AM
10 replies to this topic
#1
Posted 28 February 2007 - 03:54 AM
#2
Posted 28 February 2007 - 04:11 AM
Yeah there's probably some patches/hacks out there for specific MP3 players that can do that. Personally, that would be a cool idea!! Some MP3 players probably already give the option, though.
Which brand are you looking at?
Which brand are you looking at?
#3
Posted 28 February 2007 - 11:19 PM
well the one I was talking about was funkysouls mp3player that he made in flash.
#4
Posted 28 February 2007 - 11:33 PM
Oooohhh
Mis-read the category you put this topic in... lol
#5
Posted 01 March 2007 - 03:19 AM
Bug, on Mar 1 2007, 03:33 PM, said:
Oooohhh
Mis-read the category you put this topic in... lol
Well, I'm not familiar with his MP3 player, since I never really needed to take the tutorial. You should contact funky, probably PM him. He hasn't been on this forum much lately
#6
Posted 02 March 2007 - 02:32 AM
hmm, that's strange. Before when I had questions about it, he would answer within hours
#7
Posted 02 March 2007 - 08:47 AM
yeah, funkysoul hasn't been around very much recently. I'm pretty sure he's busy with work. Paste the code here that makes the text appear, and I'll give you a hand. Or post your fla and I'll have a look at it that way.
#8
Posted 03 March 2007 - 05:22 PM
here's the code.
and here's the link of what my mp3 player looks like if you were interested and stuff.
http://an-tonemedia....easylisten.html
stop();
timeDisplay_txt.autoSize = "left";
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;
// trace(songname[i]+" "+songfile[i]+" "+songband[i]);
}
}
_root.createEmptyMovieClip("sound_mc", 1);
_global.song_nr = 0;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]);
};
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;
}
this.onEnterFrame = function() {
_root.title_txt._x -= 1;
if (_root.title_txt._x < (-100-_root.title_txt.width)) {
_root.title_txt._x = 505.6;
}
}
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.onEnterFrame = function() {
if (this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.title_txt.text = name+" - "+band;
timeInterval = setInterval(timer, 1000, this.sound_obj);
} else {
this._parent.title_txt.text = "loading...";
}
};
this.sound_obj.onSoundComplete = function() {
clearInterval(timeInterval);
this._parent.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);
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() {
stopDrag();
};
};
function soundStatus(){
var amountLoaded = _root.sound_mc.sound_obj.getBytesLoaded() / _root.sound_mc.sound_obj.getBytesTotal();
_root.loader.loadBar._width = amountLoaded * 258;
duration = _root.sound_mc.sound_obj.duration;
position = _root.sound_mc.sound_obj.position;
_root.playHead._x = position / duration * 200.8 + 130.8;
}
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_stop.onRelease = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00 00:00";
this._parent.sound_mc.sound_obj.stop();
};
btn_fw.onRelease = function() {
clearInterval(timeInterval);
this._parent.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_rev.onRelease = function() {
clearInterval(timeInterval);
this._parent.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("http://www.an-tonemedia.com/bucketplaylist.xml");
setInterval(soundStatus,100);
setInterval(duration,100);
and here's the link of what my mp3 player looks like if you were interested and stuff.
http://an-tonemedia....easylisten.html
#9
Posted 03 March 2007 - 06:50 PM
This is the code you are looking for. Change the animation so it moves on the Y axis. Youll have to play with some of the variables and numbers so it shows up in the right spots. I have to go, but post back on here if you need more help. Good luck
this.onEnterFrame = function() {
_root.title_txt._x -= 1;
if (_root.title_txt._x < (-100-_root.title_txt.width)) {
_root.title_txt._x = 505.6;
}
}
#10
Posted 03 March 2007 - 09:12 PM
ok I got it to work. But I want it to somehow get the title of the song to be on one line and the band to be on another when it scrolls up. Is it possible?
#11
Posted 04 March 2007 - 09:48 AM
this._parent.title_txt.text = name+" - "+band;
change to:
this._parent.title_txt.text = name+"\n"+band;
That should work.
change to:
this._parent.title_txt.text = name+"\n"+band;
That should work.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
