Lingo Dictionary > S > swing() |  |

swing()

Syntax

    WhichQTVRSprite.swing(pan, tilt, fieldOfView, speedToSwing)
    swing (whichQTVRSprite, pan, tilt, fieldOfView, speedToSwing)

Description

QuickTime VR sprite function; swings a QuickTime 3 sprite containing a VR Pano around to the new view settings. The swing is a smooth "camera dolly" effect.

| `whichQTVRSprite`—Sprite number of the sprite with the QuickTime VR member.
| `pan`—New pan position, in degrees.
| `tilt`—New tilt, in degrees.
| `fieldOfView`—New field of view, in degrees.
| `speedToSwing`—Rate at which the swing should take place; specify an integer from 1 to 10 (slow to fast).

The function returns immediately, but the sprite continues to change view until it reaches the final view. The duration required to change to the final settings varies depending on machine type, size of the sprite rectangle, color depth of the screen, and other typical performance constraints.

To check if the swing has finished, check if the `pan` property of the sprite has arrived at the final value.

Example

This very gradually adusts the view of QTVR sprite 1 to a pan position of 300 degrees, a tilt of -15 degrees, and a field of view of 40 degrees.

    sprite(1).swing(300, -15, 40, 1)

See also

`pan (QTVR property)`