Выпадает ошибка
Object doesn't support this property or method
В остальных браузерах всё ок.
Пол дня бьюсь не могу понять, что такое. Подскажите.
Код флешки
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.ProgressEvent;
import flash.external.ExternalInterface;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.net.URLRequest;
public class MicroPlayer extends Sprite {
private var sound : Sound;
private var channel:SoundChannel = new SoundChannel();
public function MicroPlayer() {
if (ExternalInterface.available) {
try {
ExternalInterface.addCallback('play', startPlaying);
ExternalInterface.addCallback('stop', stopPlaying);
}
catch (error:SecurityError) {
throw error;
} catch (error:Error) {
throw error;
}
}
}
private function stopPlaying() : void {
channel.stop();
}
private function startPlaying(url : String) : void {
sound = null;
sound = new Sound();
sound.addEventListener(IOErrorEvent.IO_ERROR, onErrorHandler);
sound.addEventListener(ProgressEvent.PROGRESS, onProgress);
try {
sound.load(new URLRequest(url));
channel = sound.play();
channel.addEventListener(Event.SOUND_COMPLETE,
onSoundComplete);
}
catch(err : Error) {
onErrorHandler(null);
}
}
private function onProgress(event : ProgressEvent) : void {
}
private function onSoundComplete(event : Event) : void {
ExternalInterface.call('end');
}
private function onErrorHandler(event : IOErrorEvent) : void {
ExternalInterface.call('soundError');
}
}
}
Код страницы
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<!--[if IE]><script type="text/javascript" src="http://getfirebug.com/
releases/lite/1.2/firebug-lite-compressed.js"></script><![endif]-->
<script type="text/javascript" src="swfobject.js"></script>
<script>
flashVars = {};
params = {allowScriptAccess: "always"};
attributes = {};
function end () {alert("end");}
function soundError () {alert("soundError");}
function playSound() {
document.getElementById("microPlayer").play("Alenka.mp3");
}
swfobject.addDomLoadEvent(function () {swfobject.embedSWF
("MicroPlayer.swf","microPlayer","100","100","10.0.0","expressInstall.swf", flashVars,params,attributes);});
</script>
</head>
<body>
<div id="microPlayer">
</div>
<a rel="Alenka.mp3" onClick="playSound()">Play</a>
</body>
</html>