Download Preface - Easypano

Transcript
Easypano ** User Manual
playSound
public void playSound(int index, boolean loop)
Description: Play the number (int) sound file.
Remarks:
This function does not work if the specified sound file does not exist. Make
sure that the serial numbers of the sound files are correct.
Parameters:
index - Serial number of a sound file.
loop - Whether to circulate the sound file.
Example 1:
<FORM NAME="Sound">
<SELECT NAME="Loop">
<OPTION value="true">true
<OPTION value="false">false
</SELECT>
<INPUT TYPE="button" value="PlaySound"
onClick="document.applet.playSound(0,parseBoolean(document.Sound.Lo
op.options[Sound.Loop.selectedIndex].text));">
</FORM>
Example 2:
Head code:
<SCRIPT LANGUAGE="JavaScript">
<!-function play (index, loop)
{
document.AppletName. playSound(index, loop);
}
// -->
</SCRIPT>
Body code:
<a href="JavaScript: play (index, loop);"> play</a>
143