Play flash sound : Flash « Development « JavaScript DHTML

Home
JavaScript DHTML
1.Ajax Layer
2.Data Type
3.Date Time
4.Development
5.Document
6.Dojo toolkit
7.Event
8.Event onMethod
9.Ext JS
10.Form Control
11.GUI Components
12.HTML
13.Javascript Collections
14.Javascript Objects
15.Javascript Properties
16.jQuery
17.Language Basics
18.Mochkit
19.Mootools
20.Node Operation
21.Object Oriented
22.Page Components
23.Rico
24.Scriptaculous
25.Security
26.SmartClient
27.Style Layout
28.Table
29.Utilities
30.Window Browser
31.YUI Library
JavaScript DHTML » 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>

           
       
dynapi.zip( 791 k)
Related examples in the same category
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.