#32001/3/6 16:58:01
castLibNum
语法: member(whichCastMember).castLibNum
the castLibNum of member whichCastMember
sprite(whichSprite).castLibNum
the castLibNum of sprite whichSprite
描述:演员成员和精灵属性,检测包含指定演员成员的演员表的编号或者检测与指定精灵相联系的演员表的编号。
如果你只是改变精灵的castlibnum属性,而没有改变精灵的memberNum属性,那Director会在新演员表中使用具有同样编号的演员成员。这对影片非常有用,你可以制作一个模板,升级时只需替换新的演员表。如果你组织演员组内容以便每个演员表成员在电影有对应于它的角色的一个演员组成员编号,Director自动地正确插入新的演员组成员。为了改变精灵的演员而不管演员在那个演员表,只需改变精灵的castlibnum属性。
对一个演员组成员来说,其属性能被测试但不能设置。而对一个精灵来说,其属性既可测试又可设置。
实例:这一语句检测演员“JAZZ”在演员表中的编号。
点语法:(Dot syntax:)
put member("Jazz").castLibNum
详细语法:(Verbose syntax:)
put the castLibNum of member "Jazz"
实例: 这一语句将精灵 5 的演员所在演员表在演员库中的编号改变为演员表“Wednesday Schedule”在演员库中的编号。
点语法:
sprite(5).castLibNum = castLib("Wednesday Schedule").number
详细语法:
set the castLibNum of sprite 5 to the number of castLib "Wednesday Schedule"
××××××××××××××××××××××××××××××××××××××××××××
castMemberList
Syntax member(whichCursorCastMember).castmemberList
the castmemberList of member whichCursorCastMember
描述:光标演员属性;一个光标所使用的演员的列表。WhichCursorCastMember为光标演员的名字(名字在双引号里)或者为光标演员的编号。你也可以从不同演员表中指定演员成员。
在列表的第一演员成员是光标的第一帧,第二演员组成员是第二帧,诸如此类。
如果你指定在光标中使用无效的演员成员,他们将被忽视,余下的演员成员仍被使用。
这个属性既能被测试也能被设置。
实例:下面命令为名为“myCursor”的活动光标设置了四个演员成员。
点语法:
member("myCursor").castmemberList = \
[member 1, member 2, member 1 of castlib 2, member 2 of castlib 2]
详细语法:
set the castmemberList of member "myCursor" = \
[member 1, member 2, member 1 of castlib 2, member 2 of castlib 2]
××××××××××××××××××××××××××××××××××××××××××××
center
语法: member(whichCastMember).center
the center of member whichCastMember
描述:演员属性;与Crop相互影响的演员属性。当Crop属性为假,center属性无效。
当Crop为真,center也为真,则数字视频演员被角色的矩形居中切割。
当Crop为真,center为假,则数字视频演员的右端与底侧被角色的矩形切割。
该属性能被测试并设置。
实例:This statement causes the digital video cast member Interview to be displayed in
the top left corner of the sprite.(这一语句引起数字视频在精灵的左上角落被显示的成员会见)
Dot syntax:
member("Interview").center = FALSE
Verbose syntax:
set the center of member "Interview" to FALSE
See also crop (cast member property), centerRegPoint, regPoint, scale
××××××××××××××××××××××××××××××××××××××××××××
centerRegPoint
Syntax member(whichCastMember).centerRegPoint
the centerRegPoint of member whichCastMember
Description Flash, vector shape, and bitmap cast member property; automatically centers the
registration point of the cast member when you resize the sprite (TRUE, default); or
repositions the registration point at its current point value when you resize the
sprite, set the defaultRect property, or set the regPoint property (FALSE).
This property can be tested and set.
(Flash――矢量图形和位图演员组成员属性;当你缩放精灵时,自动地集中演员组成员的登记点(真实,缺省); 或在它的当前点数值重新定位登记点。当你缩放精灵时,设置 defaultRect 性质,或设置 regPoint 性质(假)。属性能被测试并设置。)
Example This script checks to see if a Flash movie’s centerRegPoint property is set to TRUE. If
it is, the script uses the regPoint property to reposition the sprite’s registration point
to its upper left corner. By checking the centerRegPoint property, the script ensures
that it does not reposition a registration point that had been previously set using
the regPoint property.(这个剧本检查看是否一Flash电影的 centerRegPoint 性质被设置到真实。如果它是,剧本使用 regPoint 性质重新定位精灵的登记点到它的左上角。通过检查 centerRegPoint 性质,剧本保证它不重新定位以前被设置了使用 regPoint 性质的一个登记点。)
Dot syntax:
on beginSprite me
if sprite(the spriteNum of me).member.centerRegPoint = TRUE then
sprite(the spriteNum of me).member.regPoint = point(0,0)
end if
end"
Verbose syntax:
on beginSprite me
if the centerRegPoint of member the memberNum of me = TRUE then
set the regPoint of member the memberNum of me = point(0,0)
end if
end
See also regPoint
××××××××××××××××××××××××××××××××××××××××××××
centerStage
Syntax the centerStage
Description Movie property; determines whether the Stage is centered on the monitor
when the movie is loaded (TRUE, default) or not centered (FALSE). Place the
statement that includes this property in the movie that precedes the movie you
want it to affect.(电影属性决定了:舞台是否在监视器上被集中;电影什么时候被装载(真实,缺省)或集中(假)。放在领先的电影包括这个性质的语句你想要它影响的电影。将包含这一属性的语句放在你想影响的电影之前的电影中。)
This property is useful for checking the Stage location before a movie plays
from a projector.(这一属性对于在影片放映前检查舞台位置是有用的。)
This property can be tested and set.
Note: Be aware that behavior while playing back in a projector differs between Windows
and Macintosh systems. Settings selected during creation of the projector may override
this property.(确知放映机倒放时,Windows和Macintosh系统的行为是不同的。在放映机的创建期间被选择了的设置可以越过这个性质。)
Example This statement sends the movie to a specific frame if the Stage is not centered:(如果舞台没被集中,这条语句送电影到一个特定的帧。)
if the centerStage = FALSE then go to frame "Off Center"
Example This statement changes the centerStage property to the opposite of its
current value:(这条语句改变了centerStage的属性为当前值的相反值。)
set the centerStage to (not the centerStage)
See also fixStageSize
××××××××××××××××××××××××××××××××××××××××××××
changeArea
Syntax member(whichCastMember).changeArea
the changeArea of member whichCastMember
Description Transition cast member property; determines whether a transition applies only to
the changing area on the Stage (TRUE) or to the entire Stage (FALSE). Its effect is
similar to selecting the Changing Area Only option in the Frame Properties
Transition dialog box.(转变演员组成员属性,决定转变是否仅仅适用于舞台上变化的区域(真实)或到全部舞台(假)。它的效果类似于在帧属性中选择变化区域中唯一的选择。)
This property can be tested and set.
Example This statement makes the transition cast member Wave apply only to the
changing area on the Stage.(这条语句使转变演员组成员Wave仅仅适用于舞台上变化的区域。)
Dot syntax:
member("Wave").changeArea = TRUE
Verbose syntax:
set the changeArea of member "Wave" to TRUE
××××××××××××××××××××××××××××××××××××××××××××
channelCount
Syntax member(whichCastMember).channelCount
the channelCount of member whichCastMember
sound(channelNum).channelCount
Description Sound channel and cast member property; for sound channels, determines the
number of channels in the currently playing or paused sound in the given sound
channel. For sound cast members, determines the number of channels in the
specified cast member.(声音通道和演员组成员属性,声音通道决定了当前播放中的通道数量或所给出的声音通道中暂停的声音通道数量,声音演员组成员决定了指定演员组成员中的通道数量。)
This is useful for determining whether a sound is in monaural or in stereo. This
property can be tested but not set.(这对于决定声音是否是单声或立体的大为有用。这一属性可测试亦可设置。)
Example This statement determines the number of channels in the sound cast member, Jazz.
Dot syntax:(这一语句决定了声音演员组成员中通道的数量。)
put member("Jazz").channelCount
Verbose syntax:
put the channelCount of member "Jazz"
Example This statement determines the number of channels in the sound member
currently playing in sound channel 2:(这一语句决定了声音通道2中正在播放的声音演员组成员的通道数量。)
put sound(2).channelCount
××××××××××××××××××××××××××××××××××××××××××××
char...of
Syntax textMemberExpression.char[whichCharacter]
char whichCharacter of fieldOrStringVariable
textMemberExpression.char[firstCharacter..lastCharacter]
char firstCharacter to lastCharacter of fieldOrStringVariable
Description Keyword; identifies a character or a range of characters in a chunk expression. A
chunk expression is any character, word, item, or line in any source of text (such as field cast members and variables) that holds a string.
(关键词;在一个块表达式中辩明字符的一个字符或一列字符。一个块表达式是任何字符,词,条款,或持有一个字符串的文章(例如域演员组成员和变量)的任何来源的行。)
An expression using whichCharacter identifies a specific character.
An expression using firstCharacter and lastCharacter identifies a range
of characters.
(一个使用 whichCharacter 的表达式辩明一个指定的字符。
一个使用firstcharacter和lastcharacter的表达式辨别一列字符。)
The expressions must be integers that specify a character or range of characters in
the chunk. Characters include letters, numbers, punctuation marks, spaces, and
control characters such as Tab and Return.(表达式必须是在块中指定了一个字符或一列字符的整数。
字符包括字母、数字、标点符号、空格、控制字符键,如Tab或Return。)
You can test but not set the char...of keyword. Use the put...into command to modify the characters in a string.(你能测试然而不能设置 char ...关键词。使用put...into命令修改字符串中的字符。)
Example This statement displays the first character of the string $9.00:
put ("$9.00").char[1..1]
-- "$"
Example This statement displays the entire string $9.00:
put ("$9.00").char[1..5]
-- "$9.00"
Example This statement changes the first five characters of the second word in the third line
of a text cast member(这一语句改变了一文本演员成员第三行第二个单词的前五个字符。)
member("quiz").line[3].word[2].char[1..5] = "?????"
See also mouseMember, mouseItem, mouseLine, mouseWord
××××××××××××××××××××××××××××××××××××××××××××
characterSet
Syntax member(whichFontMember).characterSet
the characterSet of member whichFontMember
Description Font cast member property; returns a string containing the characters included for
import when the cast member was created. If all characters in the original font were included,
the result is an empty string.(字体演员成员属性,演员组成员创建时,回到输入的字符串。如果所有定义为常规字体的字符都包括在内,结果为空。)
Example This statement displays the characters included when cast member 11 was created.
The characters included during import were numerals and Roman characters.(这一语句显示了演员组成员
11创建时的包含的字符。输入的字符为数字与罗马符号。)
put member(11).characterSet
-- "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
See also recordFont, bitmapSizes, originalFont
××××××××××××××××××××××××××××××××××××××××××××
charPosToLoc()
Syntax member(whichCastMember).charPosToLoc(nthCharacter)
charPosToLoc(member whichCastMember, nthCharacter)
Description Field function; returns the point in the entire field cast member (not just the part
that appears on the Stage) that is closest to the character specified by nthCharacter.
This is useful for determining the location of individual characters.
values for charPosToLoc are in pixels from the top left corner of the field cast
member. The nthCharacter parameter is 1 for the first character in the field, 2 for
the second character, and so on.(域功能,在最接近由nthCharacter.指定字符的全域演员组成员(不仅仅是舞台中出现的部分)中回到point。)
Example The following statement determines the point where the fiftieth character in the
field cast member Headline appears and assigns the result to the variable location:(下面语句决定了point,在此point中,域演员组成员的第五十个字符标题显现,且赋结果于变量。)
location = charPosToLoc(member "Headline", 50)
××××××××××××××××××××××××××××××××××××××××××××
chars()
Syntax chars(stringExpression, firstCharacter, lastCharacter)
Description Function; identifies a substring of characters in stringExpression. The substring
starts at firstCharacter and ends at lastCharacter. The expressions firstCharacter and
lastCharacter must specify a position in the string.(功能,识别stringExpression.中的substring。此substring开始于firstCharacter,结束于lastCharacter,两者须分别在字符串中指定位置。)
If firstCharacter and lastCharacter are equal, then a single character is returned from
the string. If lastCharacter is greater than the string length, only a substring up to
the length of the string is identified. If lastCharacter is before firstCharacter, the
function returns the value EMPTY.(如firstCharacter和lastCharacter相同,那么从字符串中回到这一单个字符(Character)。如果lastCharacter长于这个字符串的长度,那么只有一个与此字符串长度相当的substring被识别。如果lastCharacter在firstCharacter的前面,那么这一功能回到EMPTY值。)
To see an example of chars() used in a completed movie, see the Text movie in the
Learning\Lingo Examples folder inside the Director application folder.(要看到完成电影中的chars实例,可查看Director application folder内的Learning\Lingo Examples folder中的Text movie。)
Example This statement identifies the sixth character in the word Macromedia:(这一语句识别Macromedia一词中的第六个字符。)
put chars("Macromedia", 6, 6)
-- "m"
Example This statement identifies the sixth through tenth characters of the word
Macromedia:(这一语句确定Macromedia一词的第六个字符到第十个字符。)
put chars("Macromedia", 6, 10)
-- "media"
Example This statement tries to identify the sixth through twentieth characters of the word
Macromedia. Because the word has only 10 characters, the result includes only the
sixth through tenth characters.(这一语句势图确定Macromedia一词的第六个字符到第二十个字符。因该词仅有十个字符,结果只包括第六个到第十个字符。)
put chars ("Macromedia", 6, 20)
-- "media"
See also char...of; length() and offset() (string function); number (characters)
××××××××××××××××××××××××××××××××××××××××××××
charSpacing
Syntax chunkExpression.charSpacing
Description Text cast member property; enables specifying any additional spacing applied to
each letter in the chunkExpression portion of the text cast member.(Text演员组成员属性,能指定任何额外的间距,用于演员组成员内chunkExpression中的每一个字母。)
A value less than 0 indicates less spacing between letters. A value greater than 0
indicates more spacing between letters.(低于0值意味着字母间距较小,而大于0值则表明字母间有更大的间距。)
The default value is 0, which results in default spacing between letters.(默认值为0,这是字母间的默认间距。)
Example The following handler increases the current character spacing of the third through
fifth words within the text cast member myCaption by a value of 2:(通过将值设定为2,以下处理程序增加了text cast member中第三到第五单词的字符间距。)
on myCharSpacer
mySpacevalue = member("myCaption").word[3..5].charSpacing
member("myCaption").word[3..5].charSpacing = (mySpacevalue + 2)
end
××××××××××××××××××××××××××××××××××××××××××××
charToNum()
Syntax (stringExpression).charToNum
charToNum(stringExpression)
Description Function; returns the ASCII code that corresponds to the first character of
stringExpression.(功能;回到与stringExpression中第一个字符相应的ASCII码。)
The charToNum() function is especially useful for testing the ASCII value of
characters created by combining keys, such as the Control key and another
alphanumeric key.(charToNum()功能对测试由组合键(如控制键+其它字母数字键)录入字符的ASCII码十分有用。)
Director treats uppercase and lowercase letters the same if you compare them
using the equal sign (=) operator; for example, the statement put ("M" = "m")
returns the result 1 or TRUE.(Director对大小写的识别是一样的。比如,输入大写M与输入小写的m 都是正确的。)
Avoid problems by using charToNum() to return the ASCII code for a character and
then use the ASCII code to refer to the character.
Example This statement displays the ASCII code for the letter A:(此句显示了字母A的ASCII码。)
put ("A").charToNum
-- 65
Example The following comparison determines whether the letter entered is a capital A,
and then navigates to either a correct sequence or incorrect sequence in the Score:
on CheckKeyHit theKey(以下语句决定了开始字母输入时是否大写,顺序是否得当。)
if (theKey).charToNum = 65 then
go "Correct Answer"
else
go "Wrong Answer"
end if
end
See also numToChar()
××××××××××××××××××××××××××××××××××××××××××××
checkBoxAccess
Syntax the checkBoxAccess
Description Movie property; specifies one of three possible results when the user clicks a check
box or radio button created with button tools in the Tools window:
0 (default)-Lets the user set check boxes and radio buttons on and off.
1-Lets the user set check boxes and radio buttons on but not off.
2-Prevents the user from setting check boxes and radio buttons at all; the
buttons can be set only by scripts.(用户使用工具窗口中的check box或radio button(单选按钮)时,电影属性指定三个可能的结果中的一个。0(默认)-让用户设置checkbox和radio button(单选按钮)的开关。1-阻止用户设置checkbox和radio button(单选按钮),按钮只能在剧本中设置。)
This property can be tested and set.
Example This statement sets the checkBoxAccess property to 1, which lets the user click
check boxes and radio buttons on but not off:(这一语句将checkBoxAccess属性设为1,这时用户只可将checkbox和radio button打开而不能关闭。)
the checkBoxAccess to 1
Example This statement records the current setting of the checkBoxAccess property by
putting the value in the variable oldAccess:(这条语句记录了checkBoxAccess的当前设置,这是通过给oldAccess变量赋值而实现的。)
oldAccess to the checkBoxAccess
See also hilite (cast member property), checkBoxType
××××××××××××××××××××××××××××××××××××××××××××
checkBoxType
Syntax the checkBoxType
Description Movie property; specifies one of three ways to indicate whether a check box
is selected:(电影属性,指定说明check box是否被选的三个方法。)
0 (default)-Creates a standard check box that contains an X when the check
box is selected.(0(默认)-当check box被选时,创建一个标准的包含一个X的check box。)
1-Creates a check box that contains a black rectangle when the check box
is selected.(1-当check box被选时,创建一个包含黑框矩形的check box)
2-Creates a check box that contains a filled black rectangle when the check
box is selected.(2-当check box被选时,创建一个包含填黑矩形的check box。)
This property can be tested and set.
Example This statement sets the checkBoxType property to 1, which creates a black rectangle
in check boxes when the user clicks them:(这一语句设置checkBoxType属性为1,这样,用户点击时,check boxes中创建一个黑框矩形。)
the checkBoxType to 1
See also hilite (cast member property), checkBoxAccess