May 25, 2001 - Skipping Frames in a SWF ("swiff")
![]() |
May 25, 2001 Skipping Frames in a SWF ("swiff") 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.
GotoFrame() Flash method. The syntax is GotoFrame(frameNumber). It activates the frame number specified by frameNumber in the current track. If the data for a requested frame is not yet available, the player goes to the last frame available and stops, yielding unexpected results during playback. The argument frameNumber is zero-based. Here is the source code:
<SCRIPT LANGUAGE="JavaScript" SRC="flashsoundcheck.js"></SCRIPT> <A href="javascript://" onclick="javascript:mySwf.GotoFrame(10); return false">Play</a></FONT><P> <SCRIPT LANGUAGE="JavaScript"> Flash_embedSWF("animalsounds.swf"); var mySwf = window.document.sonify; </SCRIPT>



