Play flash sound : Flash : Development JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Development » Flash »

 

Play flash sound




<html>
<head>
<title>DynAPI Examples - FlashSound</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script language="JavaScript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
  dynapi.library.setPath('./dynapisrc/');
  dynapi.library.include('dynapi.api');
  dynapi.library.include('dynapi.functions.Image');
  dynapi.library.include('dynapi.fx.FlashSound');
</script>
<script type="text/javascript" language="JavaScript1.1">

  var myimg = dynapi.functions.getImage('./dynapiexamples/images/eicon1_off.gif',32,32,{
    border:0,
    oversrc:'./dynapiexamples/images/eicon1.gif'
  });

  var uisounds;

  uisounds = new FlashSound();
  uisounds.setSWF("./dynapiexamples/images/uisounds2.swf");

</script>
<body bgcolor="#FFFFFF">
<h2><font face="Arial" color="#3366CC"><b>FlashSound</b></font></h2>
<hr>
<p><font face="Arial">
Move your mouse over the following images to hear a sound</font></p>
  <table border="0" cellspacing="0" cellpadding="5" width="80%">
    <tr align="center" valign="middle">
      <td height="15">&nbsp; &nbsp;<script>document.write(myimg.getHTML({onmouseover:"uisounds.gotoAndPlay('/F#-E','start')",onmouseout:"uisounds.gotoAndPlay('/F#-E','fadetostop')"}))</script></td>
      <td><script>document.write(myimg.getHTML({onmouseover:"uisounds.gotoAndPlay('/F-G','start')",onmouseout:"uisounds.gotoAndPlay('/F-G','fadetostop')"}))</script></td>
      <td><script>document.write(myimg.getHTML({onmouseover:"uisounds.gotoAndPlay('/E-D#','start')",onmouseout:"uisounds.gotoAndPlay('/E-D#','fadetostop')"}))</script></td>
      <td><script>document.write(myimg.getHTML({onmouseover:"uisounds.gotoAndPlay('/C#-F#','start')",onmouseout:"uisounds.gotoAndPlay('/C#-F#','fadetostop')"}))</script></td>
      <td><script>document.write(myimg.getHTML({onmouseover:"uisounds.gotoAndPlay('/D-E','start')",onmouseout:"uisounds.gotoAndPlay('/D-E','fadetostop')"}))</script></td>
    </tr>
  </table>

</body>
</html>

           
       

Download : Download nav_dynapi.zip nav_dynapi.zip


-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Development
» Flash