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
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

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

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


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