|
主题: Lingo术语遗漏的部分!
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#162001/12/10 22:47:53
marker()
Syntax
marker(integerExpression) marker("string") Description
Function; returns the frame number of markers before or after the current frame. This function is useful for implementing a Next or Previous button or for setting up an animation loop.
The argument integerExpression can evaluate to any positive or negative integer or 0. For example:
marker(2)—Returns the frame number of the second marker after the current frame. marker(1)—Returns the frame number of the first marker after the current frame. marker(0)—Returns the frame number of the current frame if the current frame is marked, or the frame number of the previous marker if the current frame is not marked. marker(-1)—Returns the frame number of the first marker before the marker(0). marker(-2)—Returns the frame number of the second marker before the marker(0).
If the argument for marker is a string, marker returns the frame number of the first frame whose marker label matches the string.
Example
This statement sends the playback head to the beginning of the current frame if the current frame has a marker, otherwise it sends the playback head to the previous marker:
go to marker(0) Example
This statement sets the variable nextMarker equal to the next marker in the Score:
nextMarker = marker(1) See also
go, frame() (function), frameLabel, label(), labelList
编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-11 11:37:47)] [这消息被5D大叔编辑过(编辑时间2001-12-11 11:38:12)]
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#172001/12/10 22:48:54
margin
Syntax
member(whichCastMember).margin the margin of member whichCastMember Description
Field cast member property; determines the size, in pixels, of the margin inside the field box.
Example
The following statement sets the margin inside the box for the field cast member Today's News to 15 pixels:
member("Today's News").margin = 15
编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-11 11:38:41)]
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#182001/12/10 22:49:13
mapStageToMember()
Syntax
sprite(whichSpriteNumber). mapStageToMember(whichPointOnStage) mapStageToMember(sprite whichSpriteNumber, whichPointOnStage) Description
Function; uses the specified sprite and point to return an equivalent point inside the dimensions of the cast member. This properly accounts for any current transformations to the sprite using quad, or the rectangle if not transformed.
This is useful for determining if a particular area on a cast member has been clicked even if there have been major transformations to the sprite on the Stage.
If the specified point on the Stage is not within the sprite, this function returns VOID.
See also
map(), mapMemberToStage()
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#192001/12/10 22:50:07
mapMemberToStage()
Syntax
sprite(whichSpriteNumber). mapMemberToStage(whichPointInMember) mapMemberToStage(sprite whichSpriteNumber, whichPointInMember) Description
Function; uses the specified sprite and point to return an equivalent point inside the dimensions of the Stage. This properly accounts for the current transformations to the sprite using quad, or the rectangle if not transformed.
This is useful for determining if a particular area of a cast member has been clicked, even if there have been major transformations to the sprite on the Stage.
If the specified point on the Stage is not within the sprite, a VOID is returned.
See also
map(), mapStageToMember()
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#202001/12/10 22:50:33
map()
Syntax
map(targetRect, sourceRect, destinationRect) map(targetPoint, sourceRect, destinationRect) Description
Function; positions and sizes a rectangle or point based on the relationship of a source rectangle to a target rectangle.
The relationship of the targetRect to the sourceRect governs the relationship of the result of the function to the destinationRect.
Example
In this behavior, all of the sprites have already been set to draggable. Sprite 2b contains a small bitmap. Sprite 1s is a rectangular shape sprite large enough to easily contain sprite 2b. Sprite 4b is a larger version of the bitmap in sprite 2b. Sprite 3s is a larger version of the shape in sprite 1s. Moving sprite 2b or sprite 1s will cause sprite 4b to move. When you drag sprite 2b, its movements are mirrored by sprite 4b. When you drag sprite 1s, sprite 4b moves in the opposite direction. Resizing sprite 2b or sprite 1s will also produce interesting results.
on exitFrame sprite(4b).rect = map(sprite(2b).rect, sprite(1s).rect, sprite(3s).rect) go the frame end
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#212001/12/10 22:50:56
machineType
Description
This property is obsolete. Use platform instead
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#222001/12/10 22:52:14
loopsRemaining
Syntax
sound(channelNum).loopsRemaining
the loopsRemaining of sound(channelNum) Description
Read-only property; the number of times left to play a loop in the current sound playing in sound channel channelNum. If the sound had no loop specified when it was queued, this property is 0. If this property is tested immediately after a sound starts playing, it returns one less than the number of loops defined with the #loopCount property in the queue() or setPlayList() command.
See also
breakLoop(), loopCount, loopEndTime, loopStartTime, queue()
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#232001/12/10 22:52:58
loopStartTime
Syntax
sound(channelNum).queue([#member: member(whichmember), {#startTime: milliseconds, #endTime: milliseconds, #loopStartTime: milliseconds, #loopEndTime: milliseconds, #loopCount: numberOfLoops, #preloadTime: milliseconds, #rateShift: shiftAmount}]) sound(channelNum).loopStartTime Description
Cast member property; the start time, in milliseconds, of the loop for the current sound being played by soundObject. Its value is a floating-point number, allowing you to measure and control sound playback to fractions of a millisecond. The default is the startTime of the sound if no loop has been defined.
This property can only be set when passed as a property in a queue(), play(), or setPlaylist() command.
Example
This handler queues and plays two sounds. The first sound, cast member Chimes, is played in its entirety. The second sound, cast member introMusic, is played starting at its 3-second point, with a loop repeated 5 times from the 8-second point to the 8.9 second point, and stopping at the 10-second point. 4 seconds of the sound will be preloaded and it will be played back with a rateShift of 1, or at one half-step higher pitch than normal.
on playMusic sound(2).queue([#member: member("Chimes")]) sound(2).queue([#member: member("introMusic"), #startTime: 3000,\ #endTime: 10000, #loopStartTime: 8000, #loopEndTime: 8900, #loopCount: 5, \ #preloadTime: 4000, #rateShift: 1]) sound(2).play() end Example
This handler plays sound cast member introMusic in sound channel 2. Playback loops five times between two points 8 seconds and 8.9 seconds into the sound.
on playMusic sound(2).play([#member:member("introMusic"), #startTime:3000,\ #loopCount:5,#loopStartTime:8000, #loopEndTime:8900]) end Example
This handler causes the text field TimWords to read "Help me, I'm stuck!" when the currentTime of sound channel 2 is between its loopStartTime and loopEndTime:
on idle if sound(2).currentTime > sound(2).loopStartTime and \ sound(2).currentTime < sound(2).loopEndTime then member("TimWords").text = "Help me, I'm stuck!" else member("TimWords").text = "What's this sticky stuff?" end if end See also
breakLoop(), setPlaylist(), loopCount, loopEndTime, loopsRemaining, queue(), play() (sound), stop() (sound), getPlaylist()
编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-12 09:09:09)]
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#242001/12/10 22:55:41
interval
语法:
member(whichCursorCastMember).interval the interval of member whichCursorCastMember 描述:
Cursor cast member property; specifies the interval, in milliseconds (ms), between each frame of the animated color cursor cast member whichCursorCastMember. The default interval is 100 ms.
The cursor interval is independent of the frame rate set for the movie using the tempo channel or the puppetTempo Lingo command.
This property can be tested and set.
例如:
In this sprite script, when the animated color cursor stored in the cast member named Butterfly enters the sprite, the interval is set to 50 ms to speed up the animation. When the cursor leaves the sprite, the interval is reset to 100 ms to slow down the animation.
on mouseEnter member("Butterfly").interval = 50 end on mouseLeave member("Butterfly").interval = 100 end
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#252001/12/11 15:03:24
applicationName
Syntax
the applicationName Description
Global property; indicates the file name of the projector or the Director authoring application.
Example
This statement displays in a field the file name of the projector that is playing:
member("field").text = the applicationName See also
environment, productVersion
编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-12 09:09:33)]
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#262001/12/11 15:04:28
clickLoc
Syntax
the clickLoc Description
Function; identifies as a point the last place on the screen where the mouse was clicked.
Example
The following on mouseDown handler displays the last mouse click location:
on mouseDown put the clickLoc end mouseDown If the click were 50 pixels from the left end of the Stage and 100 pixels from the top of the Stage, the Message window would display the following:
-- point(50, 100)
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#272001/12/11 15:04:50
clickMode
Syntax
sprite(whichFlashSprite).clickMode the clickMode of sprite whichFlashSprite member(whichFlashMember).clickMode the clickMode of member whichFlashMember Description
Flash cast member and sprite property; controls when the Flash movie sprite detects mouse click events (mouseUp and mouseDown) and when it detects rollovers (mouseEnter, mouseWithin, and mouseLeave). The clickMode property can have these values:
#boundingBox—Detects mouse click events anywhere within the sprite's bounding rectangle and detects rollovers at the sprite's boundaries. #opaque (default)—Detects mouse click events only when the pointer is over an opaque portion of the sprite and detects rollovers at the boundaries of the opaque portions of the sprite if the sprite's ink effect is set to Background Transparent. If the sprite's ink effect is not set to Background Transparent, this setting has the same effect as #boundingBox. #object—Detects mouse click events when the mouse pointer is over any filled (nonbackground) area of the sprite and detects rollovers at the boundaries of any filled area. This setting works regardless of the sprite's ink effect.
This property can be tested and set.
Example
This script checks to see if the sprite, which is specified with an ink effect of Background Transparent, is currently set to be rendered direct to Stage. If the sprite is not rendered direct to Stage, the sprite's clickMode is set to #opaque. Otherwise (because ink effects are ignored for Flash movie sprites that are rendered direct to Stage), the sprite's clickMode is set to #boundingBox.
Dot syntax:
on beginSprite me if sprite(the spriteNum of me).directToStage = FALSE then sprite(the spriteNum of me).clickMode = #opaque else sprite(the spriteNum of me).clickMode = #boundingBox end if end Verbose syntax:
on beginSprite me if the directToStage of sprite the spriteNum of me = FALSE then set the clickMode of sprite the spriteNum of me = #opaque else set the clickMode of sprite the spriteNum of me = #boundingBox end if end
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#282001/12/11 15:05:05
clickOn
Syntax
the clickOn Description
Function; returns the last active sprite clicked by the user. An active sprite is a sprite that has a sprite or cast member script associated with it.
When the user clicks the Stage, clickOn returns 0. To detect whether the user clicks a sprite with no script, you must assign a placeholder script to it ("--," for example) so that it can be detected by the clickOn function.
The clickOn can be checked within a repeat loop. However, neither clickOn nor clickLoc functions change value when the handler is running. The value that you obtain is the value from before the handler started.
Example
This statement checks whether sprite 7 was the last active sprite clicked:
if the clickOn = 7 then alert "Sorry, try again." Example
This statement sets the foreColor property of the last active sprite that was clicked to a random color:
sprite(the clickOn).foreColor = random(255)-1 See also
doubleClick, the mouseDown (system property), mouseMember, the mouseUp (system property)
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#292001/12/11 15:05:17
closed
Syntax
member(whichCastMember).closed Description
Vector shape cast member property; indicates whether the end points of a path are closed or open.
Vector shapes must be closed in order to contain a fill.
The value can be:
TRUE—the end points are closed. FALSE—the end points are open.
|
 5D荣誉斑竹
职务:普通成员
等级:2
金币:10.0
发贴:454
注册:2001/9/6 10:45:11
|
#302001/12/11 15:05:31
close window
Syntax
window(windowIdentifier).close() close window windowIdentifier Description
Window command; closes the window specified by windowIdentifier.
To specify a window by name, use the syntax close window name, where you replace name with the name of a window. Use the complete pathname. To specify a window by its number in windowList, use the syntax close window number, where you replace number with the window's number in windowList.
Closing a window that is already closed has no effect.
Be aware that closing a window does not stop the movie in the window nor clear it from memory. This command simply closes the window in which the movie is playing. You can reopen it quickly by using the open window command. This allows rapid access to windows that you want to keep available.
If you want to completely dispose of a window and clear it from memory, use the forget window command. Make sure that nothing refers to the movie in that window if you use the forget window command, or you will generate errors when scripts try to communicate or interact with the forgotten window.
Example
This statement closes the window named Panel, which is in the subfolder MIAW Sources within the current movie's folder:
window("@/MIAW Sources/Panel").close() Example
This statement closes the window that is number 5 in windowList:
window(5).close() See also
forget window, open window, windowList
编辑历史:[这消息被5D大叔编辑过(编辑时间2001-12-12 09:10:11)]
|