![]() ![]() | |
Flash Player 6.
The methods for the ZoomifyViewer class provide the ActionScript control of the functionality of a ZoomifyViewer instance on the stage including what image is displayed, what view of the image is presented, and much more. In addition, the ZoomifyViewer Status and Callback methods provide information about a ZoomifyViewer instance's current view coorinates including information about on-going user interaction.
You do not need to use a constructor method to call the methods of the ZoomifyViewer class; instead, you reference ZoomifyViewer instances by name, using the following syntax:
ZoomifyViewerInstance.method();
Method |
Description |
|---|---|
| setView | Sets x, y, and zoom coordinates for the current view. The values x and y will be between -1 (left edge of image) and 1 (right edge of image). The zoom value is used to specify the magnification of the image where 100 means 100% magnification. |
| updateView | Causes the Zoomify Viewer to render the view. Must be called after calling setView, setX, setY, setZoom, setImagePath, setByteHandlerURL, setMapFilePath, or setSize. |
| setX | Sets the x value of the current view. The values x and y will be between -1 (left edge of image) and 1 (right edge of image). |
| setY | Sets the y value of the current view. The values x and y will be between -1 (left edge of image) and 1 (right edge of image). |
| setZoom | Sets the zoom value of the current view. The zoom value is used to specify the magnification of the image where 100 means 100% magnification. |
| zoomIn | Used to increase the zoom value of the current view when doing so in a continuous manner. |
| zoomOut | Used to decrease the zoom value of the current view when doing so in a continuous manner. |
| panUp | Used to increase the y value of the current view when doing so in a continuous manner. |
| panDown | Used to decrease the y value of the current view when doing so in a continuous manner. |
| panLeft | Used to decrease the x value of the current view when doing so in a continuous manner. |
| panRight | Used to increase the x value of the current view when doing so in a continuous manner. |
| panStop | Used after panDown, panUp, panLeft, and panRight when continuous panning of the current view is complete. |
| resetView | Sets the view to the initial view coordinates. |
| setInitialX | Sets the x value of the initial view, that is, the view on load and on reset. |
| setInitialY | Sets the y value of the initial view, that is, the view on load and on reset. |
| setInitialZoom | Sets the zoom value of the initial view, that is, the view on load and on reset. |
| setMaxZoom | Sets the maximum allowable zoom. |
| setMinZoom | Sets the minimum allowable zoom. |
| setSize | Compensates for changes to ZoomifyViewer width and height to avoid image distortion or skewing. |
| zoomToView | Implements continuous zoom and pan as necessary to traverse the image from the current view x, y, and zoom coordinates to the specified view coordinates. |
| stopZoomToView | Ends any zoomToView already in progress. |
| setEnabled | Enables or disables mouse and keyboard support for the target ZoomifyViewer instance. |
| setFocus | Sets focus on a specified ZoomifyViewer instance. |
Method |
Description |
|---|---|
| getX | Returns the x coordinate of the current view. |
| getY | Returns the y coordinate of the current view. |
| getZoom | Returns the zoom value (percent magnification) of the current view. |
| getInitialX | Gets the x value of the initial view, that is, the view on load and on reset. |
| getInitialY | Gets the y value of the initial view, that is, the view on load and on reset. |
| getInitialZoom | Gets the zoom value of the initial view, that is, the view on load and on reset. |
| getMaxZoom | Gets the maximum zoom permitted. |
| getMinZoom | Gets the minimum zoom permitted. |
| getViewHeight | Returns the height of the ZoomifyViewer instance in pixels. |
| getViewWidth | Returns the width of the ZoomifyViewer instance in pixels. |
| getImageHeight | Returns the height of the image at 100% zoom (the height of the original source image) in pixels. |
| getImageWidth | Returns the width of the image at 100% zoom (the height of the original source image) in pixels. |
| getEnabled | Returns whether mouse and keyboard support for the target ZoomifyViewer instance are currently enabled or disabled. |
| getFocus | Gets whether focus is currently true for a specified ZoomifyViewer instance. |
| calculateScreenZoom | Returns the zoom level necessary to exactly fit the image within the display area. |
| checkTileQueue | Returns whether image tile requests are currently in the request queue. |
Method |
Description |
|---|---|
| setImagePath | Sets the path for the target Zoomify image folder or file for a ZoomifyViewer instance. |
| getImagePath | Gets the path for the target Zoomify image folder or file for a ZoomifyViewer instance. |
| setByteHandlerURL | Sets the path for the byte handler for a ZoomifyViewer instance if a byte handler has been specified. |
| getByteHandlerURL | Gets the path for the byte handler for a ZoomifyViewer instance if a byte handler has been specified. |
| setMapFilePath | Sets the path for the map file for a ZoomifyViewer instance if a map file has been specified. |
| getMapFilePath | Gets the path for the map file for a ZoomifyViewer instance if a map file has been specified. |
Method |
Description |
|---|---|
| registerCallback | Registers for a callback of a certain type. The name of the callback function to be called is passed in as a string. Callback values include: Init, DownloadComplete, Mouse, Key, Focus, View, Rect, MaxZoomReached, MinZoomReached, and Status. |
| unregisterCallback | Clears a specified, previously registered callback. |
Method |
Description |
|---|---|
| addLabel | Adds a label to the display list and the current view. Accepts an XML node that describes a label. |
| setLabelProperty | Given a label ID and property name, changes the value of that property. Valid properties include x, y, xscale, yscale, and url. |
| setLabelVisibility | Sets the visibility of all labels. |
| getLabelVisibility | Gets the visibility of all labels. |
| removeLabel | Removes a label from the display list and the current view. |
| removeAllLabels | Removes all labels. |
![]() ![]() | |