...

View Full Version : play a wav file



ojoonline
12-23-2005, 06:36 AM
hi,

I have a situation where I would like to play a little sound file as an alert.

My code looks something like this:

<cfif someVar is "Y">
play the sound file
</cfif>

So, there's no click or button, etc. I have searched through the forum and have found some rather complex solutions for an event. I could use the body onload event to trigger the play, if that's required.

Any ideas on how best to achieve this?

Thank you and Merry Christmas!

jo

_Aerospace_Eng_
12-23-2005, 06:43 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Website </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
<!--
#music {
position:absolute;
left:0;
top:0;
width:1px;
height:1px;
line-height:0px;
font-size:0;
}
-->
</style>
</head>
<body>
<div id="music">
<object width="1" height="1"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="url" value="http://yoursonghere.wav">
<param name="uiMode" value="none">
<param name="autoStart" value="true">
<param name="loop" value="false">
<embed type="application/x-mplayer2"
pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
showcontrols="false" uimode="none" width="1" height="1"
src="http://yoursonghere.wav" autostart="1" loop="false"></embed>
</object>
</div>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum