This is actually more of a javascript question.
Without seeing your JS code I can only give you general instructions (though that should be enough):
You need to change the function called on whatever event is supposed to swap out the image (it's probably an onclick="function()" or an href="javascript
:function()"). Instead of changing the img src (or visibility, or location, or css background property - however it swaps the images) you're going to want to change the innerHTML of it's container element.
Also, you're only using the object element for your flash movie:
Quote:
Code:
<object type="application/x-shockwave-flash" data="products/mr16/mr16-rgb.swf" width="335" height="203">
<param name="movie" value="products/mr16/mr16-rgb.swf" />
</object>
|
You'll also need an embed for it to work in all browsers:
Code:
<embed src="" width="" height=""></embed>
I wrote up this function you can use:
Code:
function loadFlashObject(target,filepath,width,height,transparent,fversion)
{
if (!fversion || fversion < 1 || fversion > 9) fversion = 8;
var htmlToAdd = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+fversion+',0,0,0" width="'+width+'" height="'+height+'">';
htmlToAdd += '<param name="movie" value="'+filepath+'">';
if (transparent) htmlToAdd += '<param name="wmode" value="transparent" />';
htmlToAdd += '<embed src="'+filepath+'" width="'+width+'" height="'+height+'"';
if (transparent) htmlToAdd += ' wmode="transparent"';
htmlToAdd += '></embed>';
htmlToAdd += '</object>';
htmlToAdd = '<span></span>'+htmlToAdd; //spans are for IE6
try
{
document.getElementById(target).innerHTML = htmlToAdd;
}
catch (e)
{
target.innerHTML = htmlToAdd;
}
}