swfobject

swfobject play/pause/stop

可紊 提交于 2019-12-03 03:55:35
Good day. Code: <object id="ItemEditAnimationObject" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="580" height="370"> <param name="movie" value="./6.swf"> <!--[if !IE]>--> <object id="ItemEditAnimationObject" type="application/x-shockwave-flash" data="./6.swf" width="580" height="370"> </object> <!--<![endif]--> </object> <div id="PlayPause" class="Play"></div> <div id="Stop"></div> Js: function OnePlay(){ swfobject.getObjectById('Object').Play(); } function OnePause(){ swfobject.getObjectById('Object').Pause(); } function OneStop(){ swfobject.getObjectById('Object').Stop(); }

Javascript / SWFobject | Determine if a swf object exists when creating dynamic embed objects

不羁的心 提交于 2019-12-02 07:16:02
When I create SWF objects that are temporarly hidden in tabs, thus not fully loaded in some browsers, like FireFox, I can't seem to find way to figure out if the SWF is loaded or not, so I can communicate with it. /* Generate SWF (onDocumentReady())*/ swfobject.embedSWF("graph.swf","line-graph-one","100%","250","8","expressInstall.swf",null,null,null,swfRegister); /* Callback function * ------------------- * Is triggered when SWF object has done it's job, which is fine, but not a * suggestion that the SWF is actually loaded by the browser) */ function swfRegister(e){ console.log(e); } Here is

IE-8 iframe and flash object ignores z-index?

六眼飞鱼酱① 提交于 2019-12-01 06:47:47
I have the following divs and I'm trying to make the iframe layer infront of my_flash. It's a common problem and I've read through all the solutions I could find and still I'm getting issues in IE8. I'm using SWFobject by the way. Here's the source: <script type="text/javascript"> swfobject.embedSWF("index.swf", "my_flash", "100%", "100%", "8.0.0"); swffit.fit("my_flash",900,650); </script> <div id="my_flash" style="z-index:1;"></div> <div style="border:none; overflow:hidden; width:50px; height:21px; z-index:9999; position: absolute; bottom: 5px; left: 110px;" > <iframe src="http://www

IE-8 iframe and flash object ignores z-index?

做~自己de王妃 提交于 2019-12-01 04:28:55
问题 I have the following divs and I'm trying to make the iframe layer infront of my_flash. It's a common problem and I've read through all the solutions I could find and still I'm getting issues in IE8. I'm using SWFobject by the way. Here's the source: <script type="text/javascript"> swfobject.embedSWF("index.swf", "my_flash", "100%", "100%", "8.0.0"); swffit.fit("my_flash",900,650); </script> <div id="my_flash" style="z-index:1;"></div> <div style="border:none; overflow:hidden; width:50px;

javascript addEventListener onStateChange not working in IE

家住魔仙堡 提交于 2019-11-30 21:11:22
I have two colorbox popup boxes which show a youtube video in each. When they're finished playing, I'm trying to have them automatically close the colorbox window. This code below works perfect in firefox, but in IE I can't get addEventListener to work. I've tried attachEvent with no success. Can anybody offer any suggestions as to how to solve this? It seems simple but I'm exhausted trying to find a solution. By the way, this is my first time at stackoverflow and it's very impressive. UPDATE 1: Well, this is my current code. It works perfect in FF, but IE only outputs good. IE8 debugger doesn

how to detect flash using SWFObject

痞子三分冷 提交于 2019-11-30 08:02:09
问题 I have downloaded SWFObject, and included it in my website. Now I want to simply get a true or false value based on whether or not Flash is installed in the users browser when they visit my site. How can I do this? 回答1: if (swfobject.hasFlashPlayerVersion("9.0.18")) { // has Flash } else { // no Flash } or replace "9.0.18" with the minimum version you require 回答2: If You use jQuery SWFObject you could use: if (!$.flash.hasVersion('9')) { //has Flash } else { //no_flash } 来源: https:/

Changing arbitrary flash objects wmode to transparent

醉酒当歌 提交于 2019-11-30 03:18:36
问题 I need to change wmode of arbitrary flash objects to transparent from external js file to make sure they don't hide menus without using Jquery or similar libs. In FF I use getElementsByTagName("embed") and set attribute. It seems to work well. Specifically I'm having trouble with object set by swfObject library In IE7. swfObject creates the following code in iE7: <OBJECT id=mymovie height=400 width=134 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000> <PARAM NAME="_cx" VALUE="3545"> <PARAM

How to check if a swf is loaded using JavaScript with swfobject?

喜欢而已 提交于 2019-11-29 11:39:50
I have the following swf: <head> # load js <script> function graph() { swfobject.embedSWF( "open-flash-chart.swf", "chart", "400", "180", "9.0.0", "expressInstall.swf", {"data-file":"{% url monitor-graph %}"}); }; </script></head> <div id="chart"> </div> <script> graph(); </script> I would like to call the graph function only if the swf has not been loaded yet, is there a way to do this? Thanks. The last argument to embedSWF is a callback function that is invoked when the swf has been embedded. It takes in an event object with a couple of properties denoting success/failure, etc. More on this

How to check if a swf is loaded using JavaScript with swfobject?

妖精的绣舞 提交于 2019-11-28 05:30:47
问题 I have the following swf: <head> # load js <script> function graph() { swfobject.embedSWF( "open-flash-chart.swf", "chart", "400", "180", "9.0.0", "expressInstall.swf", {"data-file":"{% url monitor-graph %}"}); }; </script></head> <div id="chart"> </div> <script> graph(); </script> I would like to call the graph function only if the swf has not been loaded yet, is there a way to do this? Thanks. 回答1: The last argument to embedSWF is a callback function that is invoked when the swf has been

How to call flash actionscript callback method from javascript?

久未见 提交于 2019-11-28 01:20:02
I tried to call a flash callback method from JavaScript. But it seems not working. The flash action script example code is like below [Simplified]: import flash.events.ActivityEvent; import flash.events.StatusEvent; import flash.external.ExternalInterface; var test_var = ExternalInterface.addCallback("js_method_to_call", flash_method); function flash_method() { return "test"; } The javascript example code is written below [Simplified]: function callFlashMethod(){ var flashFile = eval("window.document.test"); flashFile.js_method_to_call; } function loadTest(){ swfobject.embedSWF("test.swf",