spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column85


Embedding Movies with Flash, Part I: Basic Methods

Developer News
OpenOffice 3.2 Lands Amid Critical Changes
Red Hat, IBM Firmly in KVM Virtualization Camp
Red Hat Talks Up Open Source Cloud Plans

Jumping to a Frame

Use the Flash method GotoFrame() to go to a certain frame. The syntax is:

GotoFrame(frameNumber)

Flash activates the frame number specified by frameNumber in the current movie. If the frame is not yet loaded, the player goes to the last frame currently available and stops, causing unexpected behavior during playback. Use the PercentLoaded() method to check the loading status of your movie, and determine whether your specific frame is already current.

The argument frameNumber is zero-based. The first frame is 0, the second frame is 1, etc. This is not in synch with the frame numbering scheme within Flash, where the frames start at 1 (the Goto action, for example). Play around with the following three links. You can rewind the movie, play it from its current position, and go to frame 300:

Rewind | Play | Go To Frame 300

Here is the code:

<A href="javascript://" onclick="javascript:mySwf.Rewind();
  return false">Rewind</A> |
<A href="javascript://" onclick="javascript:mySwf.Play();
  return false">Play</A> |
<A href="javascript://" onclick="javascript:mySwf.
  GotoFrame(300); return false">Go To Frame 300</A>
<SCRIPT LANGUAGE="JavaScript">
  Flash_embedSWF("swift3d.swf");
  var mySwf = window.document.sonify;
</SCRIPT>

Next: How to check the loading and playing progress

http://www.internet.com


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Search Engine Optimization: Selecting and Embedding Keywords · Are Google's Language Translation Web Services Ready for Prime Time? · Installing and Using Meeplace, the Business Review CMS
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
IBM DB2 10 for z/OS: Justifying the Upgrade · Living La Vida Colo: Choosing the Right Colocation Facility · FTC Concerns over Social Media Privacy Linger


Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: June 4, 2001
Revised: June 4, 2001

URL: http://www.webreference.com/js/column85/4.html