Lingo Dictionary > S > skew |  |

skew

Syntax

    sprite(whichSpriteNumber).skew

Description

Sprite property; returns, as a float value in hundredths of a degree, the angle to which the vertical edges of the sprite are tilted (skewed) from the vertical. Negative values indicate a skew to the left; positive values indicate a skew to the right. Values greater than 90° flip an image vertically.

The Score can retain information for skewing an image from +21,474,836.47° to -21,474,836.48° , allowing 59,652 full rotations in either direction.

When the skew limit is reached (slightly past the 59,652th rotation), the skew resets to +116.47° or -116.48° —not 0.00° . This is because +21,474,836.47° is equal to +116.47° , and -21,474,836.48° is equal to -116.48° (or +243.12° ). To avoid this reset condition, constrain angles to ±360° in either direction when using Lingo to perform continuous skewing.

Example

The following behavior causes a sprite to skew continuously by 2° every time the playback head advances, while limiting the angle to 360° :

    property spriteNum

    on prepareFrame me
    	sprite(spriteNum).skew = integer(sprite(spriteNum).skew + 2) mod 360
    end

See also

`flipH`, `flipV`, `rotation`