Lingo Dictionary > T-Z > width |  |

width

Syntax

    member(whichCastMember).width
    the width of member whichCastMember
    imageObject.width
    sprite(whichSprite).width
    the width of sprite whichSprite

Description

Cast member, image object and sprite property; for vector shape, Flash, animated GIF, bitmap, and shape cast members, determines the width, in pixels, of the cast member specified by `whichCastMember`, `imageObject` or `whichSprite`. Field and button cast members are not affected.

For cast members and image objects, this property can be tested; for sprites, this property can be both tested and set.

Setting this property on bitmap sprites automatically sets the sprite's `stretch of sprite` property to `TRUE`.

Example

This statement assigns the width of member 50 to the variable `height`:

    height = member(50).width

Example

This statement sets the width of sprite 10 to 26 pixels:

    sprite(10).width = 26

Example

This statement assigns the width of sprite number i + 1 to the variable `howWide`:

    howWide = sprite(i + 1).width

See also

`height`