create an empty MP3 file
and when u need to stop sound and stop downloading it
just load this MP3 file
and ur player wont play anithing because this mp3 is empty,
and it wont download anything, because it downloaded this empty mp3 file
EXAMPLE:
stop_btn.onRelease = function() {
sound.stop();
sound.loadSound("empty.mp3", true);
};
--
DenisBB,
DBB crew.
[quoted text, click to view] "Bohemme" <webforumsuser@macromedia.com> wrote in message
news:co9vgm$kbh$1@forums.macromedia.com...
> Well, having seen that this forum is alive, I'll keep on explaining more
> exactly what my problem is.
> In the code I create a new Sound variable. Then, I create a function to be
> called from elsewhere, with the parameter "music" to know what mp3 It must
> play.
> StopAllsounds() is not necessary, it's there to see if it works, but mp3s
> keep
> on streaming. When I call "musica function" it prebuffers 5 sec or so and
> then
> begins to play. That is all right for me. But if I press another button
> with
> _level0.musica(2);
> music changes, which is great, but keeps on streaming (silently, of
> course)
> music1.mp3!! I really have to take rid of this. I don't want to share my
> client's user's bandwith with straming music that is not going to be
> played at
> all! Even more, if I turn to first mp3, it begins streaming again, not
> using
> what It has streamed up to that moment!
> To stop the sound I use:
> delete _level0.miMusica;
> It stops playing, but mp3s keep on streaming!!! this is the "straming
> nightmare"!! :)
> Could you be more precise, DenisBB? You seem to have solved this problem.
> And
> it's the only part left to put the site online!
>
>
> --Sound Code below---
>
> var miMusica:Sound = new Sound();
>
> function musica(music) {
> stopAllSounds();
> miMusica.loadSound("mp3/music" + music + ".mp3", true);
> miMusica.onSoundComplete = function () {
> miMusica.start(0,10000);
> }
> }
> musica(1);
>
> Greets to all,
> David Bravo
>