Embedding Movies with Flash, Part I: Basic Methods: Panning a Zoomed-In Flash Movie - Doc JavaScript
Embedding Movies with Flash, Part I: Basic Methods
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:
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
Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: June 4, 2001
Revised: June 4, 2001
URL: https://www.webreference.com/js/column85/8.html