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

Panning a Zoomed-In Flash Movie

Use the Flash method Pan() to pan a zoomed-in movie. The syntax is:

Pan(x, y, mode)

This method pans a zoomed-in movie to the specified coordinates, x and y. The parameter mode specifies whether the coordinates are in percents (mode=1) or pixels (mode=0).

You cannot pan beyond the boundaries of the zoomed-in movie. You cannot pan a movie with a view size of 100%, either. Use the following links to play, rewind, zoom in, zoom out, pan by 50%/50%, and pan by -200/-400 pixels:

Rewind | Play | Zoom In by 2x | Zoom Out by 2x | Pan 50%/50% | Pan -200/-400

Here is the code:

<SCRIPT LANGUAGE="JavaScript" SRC="flashmoviecheck.js">
</SCRIPT>
<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.
  Zoom(50); return false">Zoom In by 2x</A> |
<A href="javascript://" onclick="javascript:mySwf.
  Zoom(200); return false">Zoom Out by 2x</A> |
<A href="javascript://" onclick="javascript:mySwf.
  Pan(50, 50, 1); return false">Pan 50%/50%</A> |
<A href="javascript://" onclick="javascript:mySwf.
  Pan(-200, -400, 0); return false">Pan -200/-400</A>
<SCRIPT LANGUAGE="JavaScript">
  Flash_embedSWF("swift3d.swf");
  var mySwf = window.document.sonify;
</SCRIPT>

Next: A Final Word

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/8.html