|
|
 |
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
|