Adding WAV audio using
the Media Object
Local and remote WAV audio
files can be
added to conclusions using the following standard OBJECT code:
<OBJECT id="Media
Player" width="320"
height="240"
style="position:absolute;
left:0;top:0;"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject"
<PARAM
NAME="URL"
VALUE="http://www.handystamper.com/media/slow.wav>
<PARAM
NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM
NAME="AutoStart" VALUE="True">
<PARAM
name="uiMode" value="none">
<PARAM
name="PlayCount" value="9999">
<PARAM
name="TransparantAtStart" VALUE="True">
<PARAM
name="AnimationAtStart " VALUE="True">
</OBJECT>
<OBJECT
id="Media Player" width="320"
height="240"
style="position:absolute;
left:0;top:0;"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject"
<PARAM
NAME="URL" VALUE="C:/slow.wav">
<PARAM
NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM
NAME="AutoStart" VALUE="True">
<PARAM
name="uiMode" value="none">
<PARAM
name="PlayCount" value="9999">
<PARAM
name="TransparantAtStart" VALUE="True">
<PARAM
name="AnimationAtStart " VALUE="True">
</OBJECT>
The Media Player is hidden
from view
when playing WAV files.
EXPERT
TEXT GLOBAL v2.14 (and later)
supports additional JavaScript in order to open applications, load
local and remote graphics and to load local and remote WAV audio files.
These are added using JavaScrupt in the
conclusions of the Knowledge base. Expert Text Global is described
fully in our book Expert Text Explained, which you can order on the
Expert Text Global
page.
Adding Graphics
EXPERT TEXT GLOBAL allows you to add .BMP graphics (that are local or
from the Internet) to the conclusions using JavaScript. To open the
Graphics you simply select Forward and select the appropriate fact that
corresponds with the conclusion that holds the graphic. The
following JavaScript scripts show how to add local and internet BMP
graphics:
<script type="text/javascript">
{
document.write('<IMG SRC="www.codelexicon.com/images/logo.bmp">');
}
</script>
or,
<script type="text/javascript">
{
document.write('<IMG SRC="C:/images/logo.bmp">');
}
</script>
The Graphics may be scrolled in the Graphic Window by holding the left
mouse button and dragging the graphic. There are also Zoom tools to
alter the size of the graphic - but to use Zoom you must include HEIGHT
and WIDTH parameters as shown below. The dimensions (in pixels) are not
restricted, and EXPERT TEXT GLOBAL is able to download any size graphic.
<script type="text/javascript">
{
document.write('<IMG SRC="C:/images/logo.bmp" WIDTH=300
HEIGHT=600>');
}
</script>
OR,
<script type="text/javascript">
{
document.write('<IMG SRC="C:/images/logo.bmp" WIDTH=200
HEIGHT=400>');
}
</script>
Opening Applications
To open applications using the knowledge base select Forward and choose
the appropriate fact to open the application.
EXPERT TEXT GLOBAL can open
external
applications (like NotePad) by adding the following script
to a conclusion:
<script
language="javascript">
function
RunCommand(RunApplication)
{
var
externalprogram = new ActiveXObject("WScript.Shell");
externalprogram.Run(RunApplication);
}
</script>
</head>
//
Using Expert Text Global the following application is opened
automatically - without clicking
<body>
<a
href="#"
onclick="RunCommand('C:\\Windows\\Notepad.exe');return
false;">Notepad</a>
</body>