This content has been marked as final. Show 8 replies
please use the attach Code button to post you code. Otherwise parts of it are interpreted as formatting code.
I'm not sure but perhaps you need to change the slashes to forward slashes in your mp3 urls in the XML.
I am sorry for not using the attachcode . I tryied what you told but it did not work.
so you put url="music/setsite.mp3" etc... like that?
that works for me.
You can use double slashes as well:
These both work for me if the mp3 is in a music directory i.e. below the level of the swf file.
If that doesn't help please post your code again in the popup window with the attach Code button
It didnt work ...here is my code:
You have a capital letter I where you should have a lower case i in the line that begins with
Also, for me it works with one or two forward slashes between music and the mp3 filename. I don't know what is best practice.
I found it didn't work for me from the flash IDE, but it works if I launch the swf separately.
Thank you GWD..It was the capital I that was causing the problem...
Now let me ask you something? If I do this mp3player with the loadSound(file,true); will the music be playing and stopping because of some internet connections?
Others here in the forums know more about the Sound class than I do... I haven't used it so much. You are using the 'streaming' type of sound with the isStreaming flag set to true which means that it starts to play before its fully downloaded. So on a slow connection I presume it could play and stop in the same way that the timeline on a movie will pause playing if the rest of it has not downloaded yet.
For a streaming sound, I guess you could get around this by implementing a partial preload by using s.stop() after issuing the s.loadSound command. Then do a "regular" preloader style checking s.getBytesLoaded vs. s.getBytesTotal ... to a percentage (you could even monitor the speed over 5-10 seconds to determine an appropriate level of buffering...maybe) and then use s.start() again.
That's how I'd tackle it, but like I said others here know more about this, and perhaps they'll have better ideas. There appear to be some quirks with the Sound class based on comments in the flash 8 livedocs...