PDA

View Full Version : Javascript Embeded Movie Cleanup



katiebugla
06-06-2012, 04:34 PM
I inherited this code from someone else, I need help cleaning it up, because I am very poorly versed in javascript.

Thank you!

Also, the site this is used at is http://highlandroadfilms.com


<div id="pic-grid">
<div id="player" style="display: none;" align="left">
<script language="JavaScript" type="text/javascript">
<!-- Hide script from sad old browsers
QT_WriteOBJECT_XHTML('http://riverroadcreative.co/qtms/ia_trailer_vail.mov',
'480', '220', '');
// -->
</script>
<script type="text/javascript">
AC_AX_RunContent( 'classid','clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B','width','480','height','220','codebase','http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0','src','http://riverroadcreative.co/qtms/ia_trailer_vail.mov','pluginspage','http://www.apple.com/quicktime/download/' ); //end AC code
</script><noscript><object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="480" height="220" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="src" value="http://riverroadcreative.co/qtms/ia_trailer_vail.mov">
<embed src="http://riverroadcreative.co/qtms/ia_trailer_vail.mov" width="480" height="220" pluginspage="http://www.apple.com/quicktime/download/">
</object></noscript>
</div>

<div id="trigger" style="display: block;" align="left">
<a target="_blank" onclick="javascript:document.getElementById('player').style.display='block';document.getElementById('trigger').style.display='none';return
false">
<img src="rrc_IA_pstr_frm.jpg" alt="Click to Play" style="border-color:#000000" border="1px" width="480" height="220">
</a>
</div>
</div>

katiebugla
06-06-2012, 06:06 PM
I am also looking to get a rollover image to work with this; here is what I have attempted with the code...


<div id="pic-grid">
<div id="player" style="display: none;" align="left">
<script language="JavaScript" type="text/javascript">
<!-- Hide script from sad old browsers
QT_WriteOBJECT_XHTML('http://riverroadcreative.co/qtms/ia_trailer_480x204.mov',
'480', '220', '');
// -->
</script>
<script type="text/javascript">
AC_AX_RunContent( 'classid','clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B','width','480','height','220','codebase','http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0','src','http://riverroadcreative.co/qtms/ia_trailer_480x204.mov','pluginspage','http://www.apple.com/quicktime/download/' ); //end AC code
</script><noscript><object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="480" height="220" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="src" value="http://riverroadcreative.co/qtms/ia_trailer_480x204.mov">
<embed src="http://riverroadcreative.co/qtms/ia_trailer_480x204.mov" width="480" height="220" pluginspage="http://www.apple.com/quicktime/download/">
</object></noscript>
</div>

<div id="trigger" style="display: block;" align="left">
<a onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('poster_rollover','','ia_poster_red.jpg',1)"><img src="ia_poster_blk.jpg" alt="Click to Play" name="poster_rollover" width="480" height="220" border="0" id="poster_rollover" onclick="javascript:document.getElementById('player').style.display='block';document.getElementById('trigger').style.display='none';return
false"/></a></div>
</div>


When I preview, I get two videos... I know I am missing something.

katiebugla
06-07-2012, 05:49 PM
Ok, I got the things I needed happen... happening... but I still would like to learn how to clean up that code....


Thanks in advance.