May 26, 2001 - Monitoring Loading Progress of SWFs
![]() |
May 26, 2001 Monitoring Loading Progress of SWFs) Tips: May 2001
Yehuda Shiran, Ph.D.
|
One of the "tiny" details is embedding the sound object. The JavaScript file included in this tip, flashsoundcheck.js, does exactly this, and other stuff. It also checks for Flash plug-ins, and minimum player version.
PercentLoaded() Flash method. The syntax is PercentLoaded(). It returns the percent of the Flash Player that has streamed into the browser so far. Possible values are between 0 and 100. For the short sound track shown here you'll probably always get 100%.Here is the source code:
<SCRIPT LANGUAGE="JavaScript" SRC="flashsoundcheck.js"></SCRIPT> <A href="javascript://" onclick="javascript:alert(mySwf.PercentLoaded()); return false">Play</a></FONT><P> <SCRIPT LANGUAGE="JavaScript"> Flash_embedSWF("animalsounds.swf"); var mySwf = window.document.sonify; </SCRIPT>



