Accessing a Plug-In : PlugIn : Development : JavaScript DHTML examples (example source code) Organized by topic

JavaScript DHTML
C++
PHP
JavaScript DHTML Home »  Development   » [  PlugIn  ]   
 



Accessing a Plug-In

Please note that some example is only working under IE or Firefox.


/*
Mastering JavaScript, Premium Edition
by James Jaworski 

ISBN:078212819X
Publisher Sybex CopyRight 2001
*/
<HTML>
<HEAD>
<TITLE>Accessing Installed Plug-ins</TITLE>
<SCRIPT LANGUAGE="JavaScript"><!--
function playVideo() {
 window.document.mars.play()
}
function stopVideo() {
 window.document.mars.stop()
}
function rewindVideo() {
 window.document.mars.rewind()
}
function forwardVideo() {
 window.document.mars.forward()
}
function forward() {
 window.document.mars.frameBack()
}
function back() {
 window.document.mars.frameForward()
}
// --></SCRIPT>
</HEAD>
<BODY>
<H1>A video of the planet Mars</H1>
<SCRIPT LANGUAGE="JavaScript"><!--
plugins=navigator.plugins
if(plugins["NPAVI32 Dynamic Link Library"]){
 document.write('<EMBED SRC="mars.avi" NAME="mars" ')
 document.writeln('AUTOSTART="TRUE" WIDTH="350" HEIGHT="240">')
}else{
 document.write('Sorry. Your browser does not have ')
 document.writeln('LiveVideo installed.')
}
// --></SCRIPT>
<FORM>
<INPUT TYPE="BUTTON" VALUE="Start" onClick="rewindVideo()">
<INPUT TYPE="BUTTON" VALUE="Play" onClick="playVideo()">
<INPUT TYPE="BUTTON" VALUE="Frame Forward" onClick="forward()">
<INPUT TYPE="BUTTON" VALUE="Frame Backward" onClick="back()">
<INPUT TYPE="BUTTON" VALUE="Stop" onClick="stopVideo()">
<INPUT TYPE="BUTTON" VALUE="End" onClick="forwardVideo()">
</FORM>
</BODY>
</HTML>

           
       
Related examples in the same category
1.   Listing Plug-In Properties
2.  Synchronizing Two Plug-Ins
3.  Determining Whether the LiveVideo Plug-In Is Installed
4.  The About Plug-Ins Script
5.  Displaying Plug-In Information
6.  Display PDF using plugin
7.  Find pluin for Midi
8.  Scan through each plug-in by provided parameters
9.  Displaying a List of Navigator Plug-Ins
10.  Properties of the Plugin Object
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.