主题:  Lingo术语遗漏的部分!

5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#12001/12/10 22:33:27
哪位仁兄帮帮忙,把遗漏部分的翻译补上,这样小弟也好把所有的Lingo整理出来。
前段时间5D事情太多,Lingo没有整理,在这里,小弟先行道歉了。rotation

Syntax

the rotation of member whichQuickTimeMember
member(whichQuickTimeMember).rotation
sprite(whichSprite).rotation
the rotation of sprite whichSprite
Description

Cast member property and sprite property; controls the rotation of a QuickTime movie, animated GIF, Flash movie, or bitmap sprite within the sprite's bounding rectangle, without rotating that rectangle or the sprite's controller (in the case of QuickTime). In effect, the sprite's bounding rectangle acts as a window through which you can see the Flash or QuickTime movie. The bounding rectangles of bitmaps and animated GIFs change to accommodate the rotating image.

Score rotation works for a Flash movie only if obeyScoreRotation is set to TRUE.

A Flash movie rotates around its origin point as specified by its originMode property. A QuickTime movie rotates around the center of the bounding rectangle of the sprite. A bitmap rotates around the registration point of the image.

For QuickTime media, if the sprite's crop property is set to TRUE, rotating the sprite frequently moves part of the image out of the viewable area; when the sprite's crop property is set to FALSE, the image is scaled to fit within the bounding rectangle (which may cause image distortion).

You specify the rotation in degrees as a floating-point number.

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

When the rotation limit is reached (slightly past the 59,652th rotation), the rotation 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, when you use Lingo to perform continuous rotation, constrain the angles to ±360° .

This property can be tested and set. The default value is 0.

Example

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

property spriteNum

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

This frame script keeps the playback head looping in the current frame while it rotates a QuickTime sprite in channel 5 a full 360° in 16° increments. When the sprite has been rotated 360° , the playback head continues to the next frame.

on exitFrame
    if sprite(5).rotation < 360 then
        sprite(5).rotation = sprite(5).rotation + 16
        go the frame
    end if
end
Example

This handler accepts a sprite reference as a parameter and rotates a Flash movie sprite 360° in 10° increments:

on rotateMovie whichSprite
    repeat with i = 1 to 36
        sprite(whichSprite).rotation = i * 10
        updatestage
    end repeat
end
See also

flipH, flipV, obeyScoreRotation, originMode



5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#22001/12/10 22:35:50
pan (sound property)

Syntax

sound(channelNum).pan
the pan of sound(channelNum)
Description

Property; indicates the left/right balance of the sound playing in sound channel channelNum.The range of values is from -100 to 100. -100 indicates only the left channel is heard. 100 indicate only the right channel is being heard. A value of 0 indicates even left/right balance, causing the sound source to appear to be centered. For mono sounds, pan affects which speaker (left or right) the sound plays through.

You can change the pan of a sound object at any time, but if the sound channel is currently performing a fade, the new pan setting doesn't take effect until the fade is complete.

To see an example of pan (sound property) used in a completed movie, see the Sound Control movie in the Learning\Lingo Examples folder inside the Director application folder.

Example

This Lingo statement pans the sound in sound channel 2 from the left channel to the right channel:

repeat with x = -100 to 100
    sound(2).pan = x
end repeat
See also

fadeIn(), fadeOut(), fadeTo(), volume (sound channel)



5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#32001/12/10 22:38:05
pause()

Syntax

sound(channelNum).pause()
pause(sound(channelNum))
Description

This command suspends playback of the current sound in sound channel channelNum. A subsequent play() command will resume playback.

Example

This statement pauses playback of the sound cast member playing in sound channel 1.

sound(1).pause()
See also

breakLoop(), isBusy(), play() (sound), playNext(), queue(), rewind(), status, stop() (sound



5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#42001/12/10 22:39:34
period

Syntax

timeoutObject.period
Description

Object property; the number of milliseconds between timeout events sent by the timeOutObject to the timeout handler.

This property can be tested and set.

Example

This timeout handler decreases the timeout's period by one second each time it's invoked, until a minimum period of 2 seconds (2000 milliseconds) is reached:

on handleTimeout timeoutObject
    if timeoutObject.period > 2000 then
        timeoutObject.period = timeoutObject.period - 1000
    end if
end handleTimeout
See also

name (timeout property), persistent, target, time (timeout object property), timeout(), timeoutHandler, timeoutList



5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#52001/12/10 22:39:53
period

Syntax

timeoutObject.period
Description

Object property; the number of milliseconds between timeout events sent by the timeOutObject to the timeout handler.

This property can be tested and set.

Example

This timeout handler decreases the timeout's period by one second each time it's invoked, until a minimum period of 2 seconds (2000 milliseconds) is reached:

on handleTimeout timeoutObject
    if timeoutObject.period > 2000 then
        timeoutObject.period = timeoutObject.period - 1000
    end if
end handleTimeout
See also

name (timeout property), persistent, target, time (timeout object property), timeout(), timeoutHandler, timeoutList



5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#62001/12/10 22:40:46
persistent

Syntax

timeoutObject.persistent
Description

Object property; determines whether the given timeoutObject is removed from the timeoutList when the current movie stops playing. If TRUE, timeoutObject remains active. If FALSE, the timeout object is deleted when the movie stops playing. The default value is FALSE.

Setting this property to TRUE allows a timeout object to continue generating timeout events in other movies. This is useful when one movie branches to another with the go to movie command.

Example

This prepareMovie handler creates a timeout object that will remain active after the declaring movie stops playing:

on prepareMovie
    -- Make a timeout object that sends an event every 60 minutes.
    timeout("reminder").new(1000 * 60 * 60, #handleReminder)
    timeout("reminder").persistent = TRUE
end
See also

name (timeout property), period, target, time (timeout object property), timeout(), timeoutHandler, timeoutList

编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-11 11:35:37)]


5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#72001/12/10 22:43:21
member (keyword)

Syntax

member whichCastMember
member whichCastMember of castLib whichCast
member(whichCastMember, whichCastLib)
Description

Keyword; indicates that the object specified by whichCastMember is a cast member. If whichCastMember is a string, it is used as the cast member name. If whichCastMember is an integer, it is used as the cast member number.

When playing back a movie as an applet, refer to cast members by number rather than by name to improve the applet's performance.

The member keyword is a specific reference to both a castLib and a member within it if used alone:

put sprite(12).member
-- (member 3 of castLib 2)
This property differs from the memberNum property of a sprite, which is always an integer designating position in a castLib but does not specify the castLib:

put sprite(12).memberNum
-- 3
The number of a member is also an absolute reference to a particular member in a particular castLib:

put sprite(12).member.number
-- 131075
Example

The following statement sets the hilite property of the button cast member named Enter Bid to TRUE:

member("Enter Bid").hilite = TRUE
Example

This statement puts the name of sound cast member 132 into the variable soundName:

soundName = member(132, "Viva Las Vegas").name
Example

This statement checks the type of member Jefferson Portrait in the castLib Presidents:

memberType = member("Jefferson Portrait", "Presidents").type
Example

This statement determines whether cast member 9 has a name assigned:

if member(9).name = EMPTY then exit
Example

You can check for the existence of a member by testing for its number:

memberCheck = member("Epiphany").number
if memberCheck = -1 then alert "Sorry, that member doesn't exist"
Example

Alternatively, you can check for the existence of a member by testing for its type:

memberCheck = member("Epiphany").type
if memberCheck = #empty then alert "Sorry, that member doesn't exist"
See also

memberNum

编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-11 11:35:59)]


5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#82001/12/10 22:43:58
mediaReady

Syntax

member(whichCastMember).mediaReady
the mediaReady of member whichCastMember
sprite(whichSpriteNumber).mediaReady
the mediaReady of sprite whichSpriteNumber
Description

Cast member or sprite property; determines whether the contents of the sprite, the specified cast member, or a movie or cast file, or linked cast member is downloaded from the Internet and is available on the local disk (TRUE) or is not available (FALSE).

This property is useful only when streaming a movie or cast file. Movie streaming is activated by setting the Movie:Playback properties in the Modify menu to Play While Downloading Movie (default setting).

When using this property to query whether the media of an internal cast member that resides in an externally linked cast is available on disk, the entire linked cast will be downloaded as a result.

For a demonstration of the mediaReady member function, see the sample movie "Streaming Shockwave" in Director Help.

This property can be tested but not set.

Example

This statement changes cast members when the desired cast member is downloaded and available locally:

if member("background").mediaReady = TRUE then
     sprite(2).memberNum = 10
    -- 10 is the number of cast member "background"
end if
See also

frameReady()

编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-11 11:36:16)]


5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#92001/12/10 22:44:20
media

Syntax

member(whichCastMember).media
the media of member whichCastMember
Description

Cast member property; identifies the specified cast member as a set of numbers. Because setting the media member property can use large amounts of memory, this property is best used during authoring only.

You can use the media member property to copy the content of one cast member into another cast member by setting the second cast member's media value to the media value for the first cast member.

For a film loop cast member, the media member property specifies a selection of frames and channels in the Score.

To swap media in a projector, it's more efficient to set the member sprite property.

Example

This statement copies the content of the cast member Sunrise into the cast member Dawn by setting the media member property value for Dawn to the media member property value for Sunrise:

member("Dawn").media = member("Sunrise").media
See also

type (cast member property)

编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-11 11:36:32)]


5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#102001/12/10 22:44:54
me

Syntax

me
Description

Special variable; used within parent scripts and behaviors to refer to the current object that is an instance of the parent script or the behavior or a variable that contains the memory address of the object.

The term has no predefined meaning in Lingo. The term me is used by convention.

To see an example of me used in a completed movie, see the Parent Scripts movie in the Learning\Lingo Examples folder inside the Director application folder.

Example

This statement sets the object myBird1 to the script named Bird. The me keyword accepts the parameter script Bird and is used to return that parameter.

myBird1 = new(script "Bird")
This is the on new handler of the Bird script:

on new me
    return me
end
Example

The following two sets of handlers make up a parent script. The first set uses me to refer to the child object. The second set uses the variable myAddress to refer to the child object. In all other respects, the parent scripts are the same.

This is the first set:

property myData

on new me, theData
     myData = theData
    return me
end

on stepFrame me
    ProcessData me
end
This is the second set:

property myData

on new myAddress, theData
    myData = theData
    return myAddress
end

on stepFrame myAddress
    ProcessData myAddress
end
See also

new(), ancestor

编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-11 11:36:48)]


5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#112001/12/10 22:45:41
mci

Syntax

mci "string"
Description

Command; for Windows only, passes the strings specified by string to the Windows Media Control Interface (MCI) for control of multimedia extensions.

Note: Microsoft no longer recommends using the 16-bit MCI interface. Consider using third-party Xtras for this functionality instead.

Example

This statement makes the command play cdaudio from 200 to 600 track 7 play only when the movie plays back in Windows:

mci "play cdaudio from 200 to 600 track 7"



5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#122001/12/10 22:46:09
maxInteger

Syntax

the maxInteger
Description

System property; returns the largest whole number that is supported by the system. On most personal computers, this is 2,147,483,647 (2 to the thirty-first power, minus 1).

This property can be useful for initializing boundary variables before a loop or for limit testing.

To use numbers larger than the range of addressable integers, use floating-point numbers instead. They aren't processed as quickly as integers, but they support a greater range of values.

Example

This statement generates a table, in the Message window, of the maximum decimal value that can be represented by a certain number of binary digits:

on showMaxvalues
    b = 31
    v = the maxInteger
    repeat while v > 0
        put b && "-" && v
        b = b-1
        v = v/2
    end repeat
end



5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#132001/12/10 22:46:34
max()

Syntax

list.max()
max(list)
max(value1, value2, value3, ...)
Description

Function; returns the highest value in the specified list or the highest of a given series of values.

The max function also works with ASCII characters, similar to the way < and > operators work with strings.

Example

This handler assigns the variable Winner the maximum value in the list Bids, which consists of [#Castle:600, #Schmitz:750, #Wang:230]. The result is then inserted into the content of the field cast member Congratulations.

on findWinner Bids
    Winner = Bids.max()
    member("Congratulations").text = \
    "You have won, with a bid of $" & Winner &"!"
end

编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-11 11:37:06)]


5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#142001/12/10 22:46:57
mask

Syntax

member(whichQuickTimeMember).mask
the mask of member whichQuickTimeMember
Description

Cast member property; specifies a black-and-white (1-bit) cast member to be used as a mask for media rendered direct to Stage with media appearing in the areas where the mask's pixels are black. The mask property lets you benefit from the performance advantages of a direct-to-Stage digital video while playing a QuickTime movie in a nonrectangular area. The mask property has no effect on non-direct-to-Stage cast members.

Director always aligns the registration point of the mask cast member with the upper left of the QuickTime movie sprite. Be sure to reset the registration point of a bitmap to the upper left corner, as it defaults to the center. The registration point of the QuickTime member cannot be reset from the upper left corner. The mask cast member can't be moved and is not affected by the center and crop properties of its associated cast member.

For best results, set a QuickTime cast member's mask property before any of its sprites appear on the Stage in the on beginSprite event handler. Setting or changing the mask property while the cast member is on the Stage can have unpredictable results (for example, the mask may appear as a freeze frame of the digital video at the moment the mask property took effect).

Masking is an advanced feature; you may need to experiment to achieve your goal.

This property can be tested and set. To remove a mask, set the mask property to 0.

Example

This frame script sets a mask for a QuickTime sprite before Director begins to draw the frame:

on prepareFrame
    member("Peeping Tom").mask = member("Keyhole")
end
See also

invertMask

编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-11 11:37:22)]


5D荣誉斑竹

职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
#152001/12/10 22:47:31
markerList

Syntax

the markerList
Description

Global property; contains a Lingo property list of the markers in the Score. The list is of the format:

frameNumber: "markerName"
This property can be tested but not set.

Example

This statement displays the list of markers in the Message window:

put the markerlist
-- [1: "Opening Credits", 15: "Main Menu", 26: "Closing Credits"]
marker()

See also

frameLabel, label(), marker(), labelList