spacer
Yehuda Shiran May 25, 2001
Skipping Frames in a SWF ("swiff")
Tips: May 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management
In some of your applications you may need to use Flash Audio and JavaScript directly, without any prepackaged APIs such as FlashSound JavaScript API. You will enjoy more features, methods, and properties, but you'll have to take care of all the tiny details that are taken for granted when using FlashSound API.

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.

The following link demonstrates the 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.

Go To Frame 10

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>


People who read this tip also read these tips:

Look for similar tips by subject:

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags