Hi,
flash can play streams (mp3, wav) from any position (if it was loaded). I can't figure out how this works with 3dfa.
Can anyone help me?
I tried this which won't work:
thxPHP Code:music.start();
music.position = the_new_position;
Printable View
Hi,
flash can play streams (mp3, wav) from any position (if it was loaded). I can't figure out how this works with 3dfa.
Can anyone help me?
I tried this which won't work:
thxPHP Code:music.start();
music.position = the_new_position;
I figured it out.
music.start(wanted_position_in_seconds/1000); //position in millisecs
now i want to make a mp3 stream player with xml playlist. maybe a server side, php driven playlist.
Cool I was trying to figure that out myself and was at a loss
am i the only one here who never figure my mistakes up by myself...well the hard ones i dont...the small stupid stuff i am (random stuff etc)
jeah. watch this..
done with 3dfa :)
mp3 stream player v1
still working on xml playlist
have a nice day
don't forget that you can use the positionbar to goto any loaded song position!
and that id3 tag is displayed in the scroller! (i used getid3.org)
Very cool indeed
What is Audio Archive?
audioarchive is a server where you can place your music files. a free storage for music ;)
I need 7 more posts to have an avatar :)
now 6 ;)
its always nice to see some one who finished his work...nice job
i afried i toke on myself some project wich will take mounths to finish...
anyway good job on that player ove there , im curiose ,how did you make the song name to appeer as small dots ? and hod did you make it move from right to left ?
thx. it's good to hear that somebody like that work. :)
1:
ok. the dot font is a simple font i found on the web.
be shure that the font has a fixed width!!
2:
and here the scroller code
first place a edit box and set the variable to "scroller"
startup script:
then we need a timer, started every 10 frames (20 frames/second is the movie set).PHP Code:scroll_max=19; //the maximal characters to display
scroll_pos=0; // initial scroller position
scroll_dir=true; //scroll direction, true=scroll right, false=scroll left
scroller = "MP3 STREAM PLAYER"; //the initial text of the scroller
timer script:
now the scroller script: (songname is the string with the song title)PHP Code:if (songname!=""){
if (scroll_dir==true) {
scroll_pos++;
} else {
scroll_pos--;
}
}
runs every 1 frame!
thats it ;)PHP Code:scroller = songname.slice(scroll_pos,scroll_pos+scroll_max);
if ((scroll_pos+scroll_max)==songname.length && scroll_dir==true) {
scroll_dir=false;
}
if (scroll_pos==0 && scroll_dir==false) {
scroll_dir=true;
}
next week i show you the xml playlist feature.
this player will play local files also! listen to cd's, local files and web streams. what a nice thing.
my inspiration:
wimpy player
now i have done the xml playlist.
have a look http://www.ejected.de/player/
try do play a local file with
file:///c:\anyfile.mp3
have a nice day
please report bugs here.
thank you!
That is 1 nice program well u should make it downloadable to becuz its small and alot better to use while playing games then windows media player lol :D
its cool all right and all but i think i can make it even cooler if ill photo my sterio and make it as a skin for your program , if you like just send me the sorce file and ill try to make it when ill have some free time , all credit of cours will go to you ....
This is really great... Good work!
I hope you will share your source, but I understand if you don't
Being like the only one who has dial-up on this forum:rolleyes:...
The player doesn't work exactly right with a dial-up connection. It messes up the song because it doesn't have time to load the entire song before reaching the end. So the bar that shows the position of the song is going back and forth.
yes, if it's finished i'll make it downloadable for everyone. but without the 3dfa source file ;)Quote:
That is 1 nice program well u should make it downloadable to becuz its small and alot better to use while playing games then windows media player lol
yeah. another skin would be great. but its hard to change the pictures in the moment.Quote:
its cool all right and all but i think i can make it even cooler if ill photo my sterio and make it as a skin for your program , if you like just send me the sorce file and ill try to make it when ill have some free time , all credit of cours will go to you ....
thank you. i don't like to share the source. but if somebode have a question. ask me! ;)Quote:
This is really great... Good work!
I hope you will share your source, but I understand if you don't
yes you be! :DQuote:
Being like the only one who has dial-up on this forum...
The player doesn't work exactly right with a dial-up connection. It messes up the song because it doesn't have time to load the entire song before reaching the end. So the bar that shows the position of the song is going back and forth.
what you think i can do to fix this. for modem users (or somebody who have not anough bandwith to stream files) the player must wait until a minimum ammount auf bytes are loaded until it starts playing. mh
what do the others think?
now most bugs are fixed. the playlist is a fully xml formatted playlist.
note: only id3v2 is supported. because id3v2 is on the beginning of a file (id3v1 at the end). to show id3v1 tags the whole song must be loaded. but the id3tag is received with a php script and downloaded to a webserver. (this is to much traffic)
you can play local files with:
file:///c:\anyfile.mp3
MP3 STREAM PLAYER
please feel free to save playlists and use this player.
please report bugs. the final version is for free download.
bye
how are you loading the XML file? I notice that the flash player askes for permission to access a file so I assume you are not using loadXML, or is that for the file itself?
I totaly understand about not releasing the source code, but how about a sample of the XML and the parsing of the XML and how you load the mp3 files.
loading xml:Quote:
how are you loading the XML file? I notice that the flash player askes for permission to access a file so I assume you are not using loadXML, or is that for the file itself?
I totaly understand about not releasing the source code, but how about a sample of the XML and the parsing of the XML and how you load the mp3 files.
load mp3 file:PHP Code:list_xml = new XML;
list_xml.ignoreWhite;
list_xml.load (base_url+"/playlists/"+loadthis_playlist+".xml");
if (list_xml.loaded){
var rootnode = list_xml.childNodes[0];
for (n=0; n<rootnode.childNodes.length; n++){
track_counter++;
var node = rootnode.childNodes[n];
for (var i=0; i<node.childNodes.length; i++){
var chnode = node.childNodes[i];
track_name[track_counter]=getsongname(chnode.childNodes[0].toString());
track_url[track_counter]=chnode.childNodes[0].toString();
}
}
show_tracks();
}
PHP Code:if(track_counter>0){
if (music_pause==true) {
music_pause=false;
music.start(pause_pos/1000);
} else {
if(track_play==0){
track_play=1;
url = track_url[track_play];
}
reset_scroller();
music=new Sound();
music.loadSound (url,true);
music.start();
}
music.setVolume (volume);
element ("playpos").show();
element ("play_perc").show();
music_play=true;
status="PLAY >";
songname=getsongname(url);
trackcount=track_play+"/"+track_counter;
// get id3 tag
if (got_id3==false) {
if (url.substr(0,7)=="http://"){
//web file -> id3v2 only
loadVariables (base_url+"/id3.php?id3v=2&remotefilename="+url,"POST");
} else {
//local file
}
}
}
have a nice day
example of the playlist in xml:
<?xml version="1.0" ?>
<playlist>
<track>
<url>http://audio22.archive.org/3/audio/s...t_netmusic.mp3</url>
</track>
<track>
<url>http://ejected.de/mp3/EJECTED-Fortuna.mp3</url>
</track>
<track>
<url>http://ejected.de/mp3/EJECTED-11101.mp3</url>
</track>
<track>
<url>http://ejected.de/mp3/EJECTED-DeepCluster.mp3</url>
</track>
<track>
<url>http://ejected.de/mp3/EJECTED-no show until tonight.mp3</url>
</track>
<track>
<url>http://ejected.de/mp3/EJECTED-Schadung.mp3</url>
</track>
<track>
<url>http://ejected.de/mp3/streams/EJECTED-my2000.mp3</url>
</track>
<track>
<url>http://ejected.de/mp3/streams/EJECTED-ultrawide v2.mp3</url>
</track>
<track>
<url>http://ejected.de/mp3/streams/EJECTED-ultrawide(saltonmyskinrmx).mp3</url>
</track>
<track>
<url>http://ejected.de/mp3/streams/EJECTED-VaultAttack.mp3</url>
</track>
</playlist>
- fixed some playlist and button bugs.
- added page counter for the playlist.
player
have a nice day
- added playtime display (only id3v2)
This is really neat. How did you get the words at the top in that font even if the user doesn't have the font?
(Still is slightly weird using Dial-Up, but I looked at it at work (T2) and it works wonderfully!)
Quote:
This is really neat. How did you get the words at the top in that font even if the user doesn't have the font?
check the switch "Export font outlines" !!!!
available for titletext, textboxes and more...
- added window with id3 tag information. you can read all the id3v2-tags by pressing the ID3 button. once opened you can click on the URL to open the url in a new browser window if the url-tag of id3v2 contains a valid url. nice simple feature :cow:
anything else to do? mh. i don't know in the moment...
watch: player
- fixed time sync. if track has id3v2 tags the playtime is displayed correctly
- fixed save dialog
it's going to be perfect. :)
- added flash parameters:
player.swf?load_playlist=playlist01&autoplay=1
load_playlist=playlist01
---------------------------
loads the playlist with the name playlist01.xml in the playlist directory
autoplay=1
------------
begins playing the first track of the loaded playlist automatically. works only if playlist was loaded with load_playlist
- the actually playing track is highlighted now.
- playlist is autoscrolling if next track is not visible in playlist
Now that is one excellent piece of work !!
Just 1 suggestion:
It would be nice to have a more user friendly way to add local files. (ie. The normal windows 'browse files' box. I'm not sure how easy this is to do. Perhaps it an be done by calling some PHP script and passing the file name back as a variable?)
Congratulations on a great result.
Morgan.
thank you. nice to hear that.Quote:
Originally posted by ForumNewbie
Now that is one excellent piece of work !!
Just 1 suggestion:
It would be nice to have a more user friendly way to add local files. (ie. The normal windows 'browse files' box. I'm not sure how easy this is to do. Perhaps it an be done by calling some PHP script and passing the file name back as a variable?)
Congratulations on a great result.
Morgan.
yes it would be nice to add local files with a browse files dialog box. i'm working on this. i want a playlist editor, completely in php. because if you want to pass variables from outside (php or whatever) to the movie then you need to restart the movie. only if you send a request from within movie you can recieve data from php. so, i think a php playlist editor is the best way.
the movie should get a switch (edit=false|true) which controls that the movie has playlist edit functions or not. the normal use of this movie is to add it to a webpage that other users can listen to your music. they don't need to edit the playlist.
for users who want to use this as player like winamp:
you need to start the php files locally on your pc. for this you need a local installed webserver and locally installed php! but then you have full ability of id3 tags for local files.
maybe, sometimes i'll think about this.
have a nice flashing day :mrpimp:
- added url update button. now you can edit playlistentries.
- add quickinfo under pointer for some actions like "Playlist saved."
- change functionality of add button
i want to add some more features. then i'll release a full package for use on your own homepage. you will need php4 functionality on your webhost.
the configuration is easy. just edit 2 files in texteditor, upload folder to webserver and change CHMOD 777 on the folder playlists. thats it.
main missing features:
- sort playlist entries
do you want some more nice features. please tell me!
- added download button in playlist to download track.
- fixed bug with searching in VBR mp3's