Для встраивания флехи я вот этой библиотекой воспользовался: http://blog.deconcept.com/swfobject/ и всё стало работать, как там это работает не разбирался. Вот код:
| Код | var isFlashLite = function() { if (!window.navigator || !window.navigator.mimeTypes) return false; var mimeType = window.navigator.mimeTypes["application/x-shockwave-flash"]; if (!mimeType || !mimeType.enabledPlugin || !mimeType.enabledPlugin.filename) return false; return mimeType.enabledPlugin.filename.match(/flashlite/i) ? true : false; };
var container = document.createElement("div"); container.id = "sound_container_" + window.audio_count; // Hides Flash box. We cannot use display: none or visibility: hidden because it prevents // Flash from loading at least in IE. So we move it out of the screen at (-100, -100). // But this even doesn't work with Flash Lite (e.g. in Droid Incredible). So with Flash // Lite, we put it at (0, 0). This shows 1x1 box visible at left-top corner but this is // the best we can do as far as we know now. container.style.position = "absolute"; if (isFlashLite()) { container.style.left = "0px"; container.style.top = "0px"; } else { container.style.left = "-100px"; container.style.top = "-100px"; } var holder = document.createElement("div"); holder.id = "sound_flash_" + window.audio_count; container.appendChild(holder); document.body.appendChild(container); // See this article for hasPriority: // http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36cfb8137124318eebc6-7ffd.html swfobject.embedSWF( options.swf, holder.id, "1" /* width */, "1" /* height */, "9.0.0" /* SWF version */, null, {}, { quality: "high", allowScriptAccess: "always" } );
|
|