Detailed instructions for use are in the User's Guide.
[. . . ] Lingo Dictionary
Macromedia Director MX
Trademarks Afterburner, AppletAce, Attain, Attain Enterprise Learning System, Attain Essentials, Attain Objects for Dreamweaver, Authorware, Authorware Attain, Authorware Interactive Studio, Authorware Star, Authorware Synergy, Backstage, Backstage Designer, Backstage Desktop Studio, Backstage Enterprise Studio, Backstage Internet Studio, Contribute, Design in Motion, Director, Director Multimedia Studio, Doc Around the Clock, Dreamweaver, Dreamweaver Attain, Drumbeat, Drumbeat 2000, Extreme 3D, Fireworks, Flash, Fontographer, FreeHand, FreeHand Graphics Studio, Generator, Generator Developer's Studio, Generator Dynamic Graphics Server, Knowledge Objects, Knowledge Stream, Knowledge Track, Lingo, Live Effects, Macromedia, Macromedia M Logo & Design, Macromedia Contribute, Macromedia Flash, Macromedia Xres, Macromind, Macromind Action, MAGIC, Mediamaker, Object Authoring, Power Applets, Priority Access, Roundtrip HTML, Scriptlets, SoundEdit, ShockRave, Shockmachine, Shockwave, Shockwave Remote, Shockwave Internet Studio, Showcase, Tools to Power Your Ideas, Universal Media, Virtuoso, Web Design 101, Whirlwind and Xtra are trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words or phrases mentioned within this publication may be trademarks, servicemarks, or tradenames of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. [. . . ] Using the mouseH and mouseV functions together, you can determine the cursor's exact location. The Director player for Java doesn't update the mouseH function when Lingo is in a repeat loop. This function can be tested but not set.
Examples
This handler moves sprite 10 to the mouse pointer location and updates the Stage when the user clicks the mouse button:
on mouseDown sprite(10). locH = the mouseH sprite(10). locV = the mouseV updateStage end
This statement tests whether the pointer is more than 10 pixels to the right or left of a starting point and, if it is, sets the variable Far to TRUE:
if abs(mouseH() - startH) > 10 then draggedEnough = TRUE
See also
locH, locV, mouseV, mouseLoc
394
mouseItem
Syntax
the mouseItem
Description
System property; contains the number of the item under the pointer when the function is called and the pointer is over a field sprite. (An item is any sequence of characters delimited by the current delimiter as set by the itemDelimiter property. ) Counting starts at the beginning of the field. If the mouse pointer is not over a field, the result is -1. The value of the mouseItem property can change in a handler or repeat loop. If a handler or repeat loop relies on the initial value of mouseItem when the handler or repeat loop begins, call the property once and assign its value to a local variable.
Examples
This statement determines whether the pointer is over a field sprite and changes the content of the field cast member Instructions to "Please point to an item. " when it is not:
if the mouseItem = -1 then member("Instructions") = "Please point to an item. " end if
This statement assigns the item under the pointer in the specified field to the variable
currentItem: currentItem = member(mouseMember). item(mouseItem)
This handler highlights the item under the pointer when the mouse button is pressed:
on mouseDown thisField = sprite(the clickOn). member if the mouseItem < 1 then exit lastItem = 0 repeat while the stillDown MI = the mouseItem if MI < 1 then next repeat if MI <> lastItem then thisField. item[MI]. hilite() lastItem = MI end if end repeat end
See also
item. . . of, mouseChar, mouseLine, mouseWord, number (items), itemDelimiter
395
on mouseLeave
Syntax
on mouseLeave statement(s) end
Description
System message and event handler; contains statements that run when the mouse leaves the active area of the sprite. The mouse button does not have to be pressed. If the sprite is a bitmap cast member with the matte ink applied, the active area is the portion of the image that is displayed; otherwise, the active area is the sprite's bounding rectangle. If used in a behavior, this event is passed the sprite script or frame script reference me.
Example
This statement shows a simple button behavior that switches the bitmap of the button when the mouse pointer rolls over and then back off the button:
property spriteNum on mouseEnter me -- Determine current cast member and switch to next in cast currentMember = sprite(spritenum). member. number sprite(spritenum). member = currentMember + 1 end on mouseLeave me -- Determine current cast member and switch to previous in cast currentMember = sprite(spritenum). member. number sprite(spritenum). member = currentMember - 1 end
See also
on mouseEnter, on mouseWithin
mouseLevel
Syntax
sprite(whichQuickTimeSprite). mouseLevel the mouseLevel of sprite whichQuickTimeSprite
Description
QuickTime sprite property; controls how Director passes mouse clicks on a QuickTime sprite to QuickTime. The ability to pass mouse clicks within the sprite's bounding rectangle can be useful for interactive media such as QuickTime VR. The mouseLevel sprite property can have these values:
#controller--Passes clicks only on the movie controller to QuickTime. Director responds only to mouse clicks that occur outside the controller. This is the standard behavior for QuickTime sprites other than QuickTime VR. #all--Passes
all mouse clicks within the sprite's bounding rectangle to QuickTime. Director responds to all mouse clicks.
#none--Does
#shared--Passes all mouse clicks within a QuickTime VR sprite's bounding rectangle to QuickTime and then passes these events to Lingo handlers. This is the default value for QuickTime VR.
396
This property can be tested and set.
Example
This frame script checks to see if the name of the QuickTime sprite in channel 5 contains the string "QTVR. " If it does, this script sets mouseLevel to #all; otherwise, it sets mouseLevel to #none.
on prepareFrame if sprite(5). member. name contains "QTVR" then sprite(5). mouseLevel = #all else sprite(5). mouseLevel = #none end if end
mouseLine
Syntax
the mouseLine
Description
System property; contains the number of the line under the pointer when the property is called and the pointer is over a field sprite. Counting starts at the beginning of the field; a line is defined by Return delimiter, not by the wrapping at the edge of the field. When the mouse pointer is not over a field sprite, the result is -1. The value of the mouseLine property can change in a handler or repeat loop. If a handler or repeat loop uses this property multiple times, it's usually a good idea to call the property once and assign its value to a local variable.
Examples
This statement determines whether the pointer is over a field sprite and changes the content of the field cast member Instructions to "Please point to a line. " when it is not:
if the mouseLine = -1 then member("Instructions"). text = "Please point to a line. "
This statement assigns the contents of the line under the pointer in the specified field to the variable currentLine:
currentLine = member(the mouseMember). line[the mouseLine]
This handler highlights the line under the pointer when the mouse button is pressed:
on mouseDown thisField = sprite(the clickOn). member if the mouseLine < 1 then exit lastLine = 0 repeat while the stillDown ML = the mouseLine if ML < 1 then next repeat if ML <> lastLine then thisField. line[ML]. hilite() lastLine = ML end if end repeat end
See also
mouseChar, mouseItem, mouseWord, line. . . of, number (lines)
397
mouseLoc
Syntax
the mouseLoc
Description
Function; returns the current position of the mouse as a point(). The point location is given as two coordinates, with the horizontal location first, then the vertical location.
See also
mouseH, mouseV
mouseMember
Syntax
the mouseMember
Description
System property; returns the cast member assigned to the sprite that is under the pointer when the property is called. [. . . ] Specifies the same version number that appears in the Properties dialog box (Windows) or Info window (Macintosh) when the file is selected on the desktop. An Xtra may not necessarily have a version number.
Examples
This statement displays the xtraList in the Message window:
put the xtraList
This handler checks the version of a given Xtra:
-- This handler checks all the available Xtra extensions to return the version of the requested Xtra -- The XtraFileName may be only a partial match if desired -- Use the full filename for more exact usage -- The string returned is either the version property for the Xtra or an empty string -- It may be empty if either the version property doesn't exist or the Xtra is not found in the available list on GetXtraVersion XtraFileName -- Get the entire list of Xtra extensions and their information listOfXtras = the xtraList -- Initialize the local variable to contain the version theVersion = "" -- Iterate through all the Xtra extensions listed repeat with currentXtra in listOfXtras -If the current Xtra's name contains the Xtra passed in, then check for the version if currentXtra. name contains XtraFileName then -First determine if the version property exists for that Xtra versionFlag = getaProp(currentXtra, #version) -If the version property is not VOID, then set the local variable to -- the string contained in that property value if not voidP(versionFlag) then theVersion = currentXtra. version end if end if end repeat -- Return the version information found or an empty string return theVersion end
See also
movieXtraList, getaProp
734
xtras
See
number of xtras
y (vector property)
Syntax
member(whichCastmember). vector. y member(whichCastmember). vector[2]
Description
3D property; allows you to get or set the y component of a vector.
Example
This statement shows the y component of a vector:
vec = vector(20, 30, 40) put vec. y -- 30. 0000
yAxis
Syntax
member(whichCastmember). transform. yAxis
Description
3D transform property; allows you to get but not set the vector representing the transform's canonical y-axis in transform space.
Example
The first line of this example sets the transform of the model ModCylinder to the identity transform. The next two lines show that the Y axis of ModCylinder is the vector ( 0. 0000, 1. 0000, 0. 0000). This means that the y-axis of ModCylinder is aligned with the y-axis of the world. [. . . ]