wolfkin Posted March 23, 2011 Report Share Posted March 23, 2011 (edited) Redacted - http://pastebin.com/7VWdWmbP Current HTML http://pastebin.com/hGqDiyX5 It seems to me like my problem is I can't get swfobject.removeSWF("videodiv"); to work. <script type="text/javascript"> $(function () { $('#switchtimer').countdown({ until: '+6s', // Time expires 60 seconds from load then calls change_video alwaysExpire: true, onExpiry: change_video }); function change_video() { var next_video = "Y4vLhJuKHxg"; // set next_video variable var ytid = next_video // change video from CD2LRROpph0 to Y4vLhJuKHxg swfobject.removeSWF("videodiv"); swfobject.embedSWF("http://www.youtube.com/e/" + ytid + "?enablejsapi=1&playerapiid=ytplayer","videodiv", "640", "390", "8", null, null, params, atts); } }); </script> <script type="text/javascript"> var params = { allowScriptAccess: "always" }; var atts = { id: "myytplayer" }; var ytid = "CD2LRROpph0"; swfobject.embedSWF("http://www.youtube.com/e/" + ytid + "?enablejsapi=1&playerapiid=ytplayer","videodiv", "640", "390", "8", null, null, params, atts); </script> I'm trying to get the movie to switch from Movie A to Movie B when the timer finishes. I've gotten the JS to show Movie A and I've gotten the JS to show Movie B when the timer ends but I can't get it to switch from A to B. My best guess is swfobject.removeSWF isn't working and I'm not sure why. Edited March 23, 2011 by wolfkin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.