ActionScript Reference

 Events

onLoadFile 


Methods

loadNew
startAutoPan
stopAutoPan
zoomIn
zoomOut

 


Events

onLoadFile

Usage

myPanView.onLoadFile = function() {};

Parameters

None.

Returns

Nothing.

Description

Event handler; invoked when loading of a panoramic file is finished.

Example

The following example defines a function for the onLoadFile method that sends a trace action to the Output window.

myPanView.onLoadFile = function()
{
trace ("File is Loaded!");
}

 

Methods

loadNew

Usage

myPanView.loadNew(file_name, picIs360);

Parameters

file_name - Name of the 360Pan file to load. .jpg or .swf for external files, otherwise component will look for movieclip in the library with the same identifier

picIs360 - Boolean. Indicates if newly loaded picture will behave as a 360 degree pan picture or not. This parameter is optional

Returns

Nothing

Description

Method; Loads new panoramic file and reinitializes the component

Example

The following code will load new file and make endless scrolling loop with it (second parameter indicates that the picture is a 360 degree panoramic image):

myPanView.loadNew("myPan.jpg", true); 

 

startAutoPan

Usage

myPanView.startAutoPan(time, speed_x, speed_y);

Parameters

time - Number of seconds to wait before autopanning starts
speed_x - Horizontal speed factor of autopanning
speed_y - Vertical speed factor of autopanning

Returns

Nothing

Description

Method; Enables autopanning and sets its properties. Autopanning will take place only when zoom is 100% and the mouse button is released.

Example

The following code will set autopanning to start after 5 seconds with normal speed

myPanView.startAutoPan(5, 16);

 

stopAutoPan

Usage

myPanView.stopAutoPan();

Parameters

None.

Returns

Nothing

Description

Method; Disables and stops autopanning.

Example

The following code will stop autopanning:

myPanView.stopAutoPan();

 

zoomIn

Usage

myPanView.zoomIn();

Parameters

None.

Returns

Nothing

Description

Method; Zoom In - 110%

Example

The following code will zoom in the current view

myPanView.zoomIn();

 

zoomOut

Usage

myPanView.zoomOut();

Parameters

None.

Returns

Nothing

Description

Method; Zoom Out - 90%

Example

The following code will zoom out the current view

myPanView.zoomOut();