rvr_1
asked on
Adding a hyperlink to a flash movie
I have created a flash movie (.swf) in Macromedia Flash MX. It's just a few of our products that fade from one to another and is featured on our homepage.
However, I cannot work out how to add a hyperlink to this movie so that the user can click on it and be taken to the products page. I do not wish to have multiple links for each item shown, just one link regardless of which item is shown.
The code I have used to include the movie is:
<script language=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["appli cation/x-s hockwave-f lash"]) ? navigator.mimeTypes["appli cation/x-s hockwave-f lash"].ena bledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwa ve Flash"].description.split( " ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])) )
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexO f("MSIE")> =0
&& (navigator.appVersion.inde xOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCa nPlay = ( IsObject(CreateObject("Sho ckwaveFlas h.Shockwav eFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
document.write('<object classid="clsid:D27CDB6E-AE 6D-11cf-96 B8-4445535 40000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ');
document.write(' width="330" height="380">');
document.write(' <param name="WMode" value="Transparent"> ');
document.write(' <param name="movie" value="flash/fadingallbran ds.swf"> ');
document.write(' <param name="quality" value="high"> ');
document.write(' <embed src="flash/fadingallbrands .swf" width="350" height="406" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockw ave-flash" >');
document.write(' </embed>');
document.write(' </object>');
} else{
document.write('<div align="center"><img src="Images/noflash.png" width="315" height="200" border="0" usemap="#flash">');
}
//-->
</script>
Please can anyone point me in the right direction.
Thanks.
However, I cannot work out how to add a hyperlink to this movie so that the user can click on it and be taken to the products page. I do not wish to have multiple links for each item shown, just one link regardless of which item is shown.
The code I have used to include the movie is:
<script language=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["appli
if ( plugin ) {
var words = navigator.plugins["Shockwa
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i]))
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexO
&& (navigator.appVersion.inde
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCa
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
document.write('<object classid="clsid:D27CDB6E-AE
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ');
document.write(' width="330" height="380">');
document.write(' <param name="WMode" value="Transparent"> ');
document.write(' <param name="movie" value="flash/fadingallbran
document.write(' <param name="quality" value="high"> ');
document.write(' <embed src="flash/fadingallbrands
document.write(' </embed>');
document.write(' </object>');
} else{
document.write('<div align="center"><img src="Images/noflash.png" width="315" height="200" border="0" usemap="#flash">');
}
//-->
</script>
Please can anyone point me in the right direction.
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...and the more accurate method too (in terms of the fact that it is actually a hyperlink).
Billystyx
Billystyx
ASKER
Got it working now - thanks for your help!
this.createTextField("my_t
my_txt.html = true;
my_txt.htmlText = "<a href='www.google.com'>here</a>";