Setting the Minimum Supported Version
Sometimes, writing a version-independent script gives too much overhead. Instead, you may elect to support only versions higher than a minimum version number. Usually, 80% of your surfers have the most updated player version. So, why bother with older versions? You set the minimum supported version by the setMinPlayer() method. The single argument is the version number.
Let's verify that indeed setMinPlayer() is doing the job. Since the highest player version number is 5, we would mute the player when we put 6 as the minimum version number. The following three lines of links demonstrate this fact. Set the minimum player version to 5 and get the bottom two lines of links to function as expected. Set the minimum player version to 6 and make the player mute.
Set Minimum Player to 5 Set Minimum Player to 6 Rewind and Play the Tutorial Pause Continue Is Playing?
Play A Scale
Here is the source code:
<HTML>
<HEAD>
<SCRIPT SRC="flashsound.js"></SCRIPT>
<SCRIPT>
var mySoundObj1 = new FlashSound();
var mySoundObj2 = new FlashSound();
</SCRIPT>
</HEAD>
<BODY>
<P><A HREF="javascript://"
onmouseover="FlashSound.setMinPlayer(5);
alert('Minimum Player Version Set to 5')">
Set Minimum Player to 5</A>
<A HREF="javascript://"
onmouseover="FlashSound.setMinPlayer(6);
alert('Minimum Player Version Set to 6')">
Set Minimum Player to 6</A></P>
<A HREF="javascript://"
onmouseover="mySoundObj1.TGotoAndPlay('/',1)">
Rewind and Play the Tutorial</A>
<A HREF="javascript://"
onmouseover="mySoundObj1.TStopPlay('/')">Pause</A>
<A HREF="javascript://"
onmouseover="mySoundObj1.TPlay('/')">Continue</A>
<A HREF="javascript://"
onmouseover="alert(mySoundObj1.IsPlaying('/'))">
Is Playing?</A></P>
<A HREF="javascript://"
onmouseover="if (!mySoundObj1.IsPlaying())
mySoundObj2.TGotoAndPlay('/scale-event', 'start')">
Play A Scale</A></P>
<SCRIPT>
mySoundObj1.autostart = false;
mySoundObj1.embedSWF("earsonly.swf");
mySoundObj2.embedSWF("scale.swf");
</SCRIPT>
</BODY>
</HTML>
            
Next: How to suppress error messages
|