1090
Chapter 14: Properties
width
Usage
-- Lingo syntax
memberObjRef
.width
imageObjRef
.width
spriteObjRef
.width
// JavaScript syntax
memberObjRef
.width;
imageObjRef
.width;
spriteObjRef
.width;
Description
Member, Image, and Sprite property; for vector shape, Flash, animated GIF, RealMedia,
Windows Media, bitmap, and shape cast members, determines the width, in pixels, of a cast
member. Read-only for cast members and image objects, read/write for sprites.
This property does not affect field and button cast members.
Example
This statement assigns the width of member 50 to the variable
theHeight
:
-- Lingo syntax
theHeight = member(50).width
// JavaScript syntax
var theHeight = member(50).width;
This statement sets the width of sprite 10 to 26 pixels:
-- Lingo syntax
sprite(10).width = 26
// JavaScript syntax
sprite(10).width = 26;
This statement assigns the width of sprite number i + 1 to the variable
howWide
:
-- Lingo syntax
howWide = sprite(i + 1).width
// JavaScript syntax
var howWide = sprite(i + 1).width;
See also
height
,
image (Image)
,
Member
,
Sprite
Содержание DIRECTOR MX 2004
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...