I found some code that opens the flash on page load, but i have no idea how to add the function to a link so the flash will only load when the link is clicked. ideas? see code below:
Code:
<!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>Captivate-to-Flash ExternalInterface example</title>
<script type="text/javascript" src="scripts/swfobject.js"></script>
<script type="text/javascript">
function addFlash(){
var so = new SWFObject("images/series_test.swf", "mov1", "640", "480", "8", "#FFFFFF");
so.write("flashContainer");
}
window.onload=function(){
addFlash();
}
</script>
<!-- for Flash-JS communication -->
<script language="JavaScript">
//Detect Flash container movie
function getFlashMovie(mov1) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[mov1];
}
else {
return document[mov1];
}
}
//Function to be called by Captivate
function captivateUnload() {
//Calls "unload" method established in ExternalInterface Actionscript code
getFlashMovie("simpleSwfLoader").unload();
}
</script>
</head>
<body>
<div id="flashContainer">If you see this message, you have Javascript disabled. Please enable Javascript to see the Flash content.</div>
</body>
</html>
Bookmarks