Timofei Davydik
Timofei Davydik

Reputation: 7294

Flash sound doesn't work in most browsers

I'm trying to play sound from url.

var s : Sound = new Sound();
s.load(new URLRequest("http://85.21.236.228:8000"));
s.play();

It's OK in Opera browser. But in IE, Chrome, Firefox there's no any sound. Can anyone help me? Thanks.

Upvotes: 1

Views: 598

Answers (2)

Timofei Davydik
Timofei Davydik

Reputation: 7294

Finally, I've found the solution. URL should end with "/;". So,

s.load(new URLRequest("http://85.21.236.228:8000/;"));

this works.

Upvotes: 1

www0z0k
www0z0k

Reputation: 4434

try

sound = new Sound();
sound.addEventListener(Event.OPEN, onStart);
sound.load(new URLRequest(path));

private function onStart(e:Event):void {
    channel = sound.play();
}

btw does your link return an mp3 file?

Upvotes: 1

Related Questions