MACROMEDIA Director MX User Manual

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.
This guide contains links to third-party Web sites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party Web site mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites.
Apple Disclaimer APPLE COMPUTER, INC. MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, REGARDING THE ENCLOSED
COMPUTER SOFTWARE PACKAGE, ITS MERCHANTABILITY OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. THE EXCLUSION OF IMPLIED WARRANTIES IS NOT PERMITTED BY SOME STATES. THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. THIS WARRANTY PROVIDES YOU WITH SPECIFIC LEGAL RIGHTS. THERE MAY BE OTHER RIGHTS THAT YOU MAY HAVE WHICH VARY FROM STATE TO STATE.
Copyright © 2002 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without prior written approval of Macromedia, Inc. Third Party Software Notices and/or Additional Terms and Conditions can be found at http://www.macromedia.com/go/thirdparty/. Part Number ZDR90M200
Acknowledgments
Writing: Jay Armstrong, George Brown, Stephanie Gowin, and, Tim Statler Editing: Rosana Francescato, Mary Ferguson, Mary Kraemer, and Noreen Maher Project Management: Stuart Manning Production: Chris Basmajian, Caroline Branch, John Francis, and Patrice O’Neill Multimedia: Aaron Begley and Benjamin Salles
First Edition: December 2002
Macromedia, Inc. 600 Townsend St. San Francisco, CA 94103
CHAPTER 1
Lingo by Feature
This chapter lists various Macromedia Director MX features and the corresponding Lingo elements that you can use to implement those features.
Accessibility
These terms are useful for making movies accessible to the disabled:
Text-to-speech
voiceCount() voiceSet()
voiceGet() voiceSetPitch()
voiceGetPitch() voiceSetRate()
voiceGetRate() voiceSetVolume()
voiceGetVolume() voiceSpeak()
voiceInitialize() voiceState()
voicePause() voiceStop()
voiceResume() voiceWordPos()
Keyboard navigation
autoTab selection (cast property)
hilite (command) selectedText
keyboardFocusSprite selEnd
selection (text cast member property) selStart
selection() (function)
3
Animated GIFs
These terms are useful for working with animated GIFs:
directToStage pause (movie playback)
frameRate playBackMode
linked resume sprite
moviePath rewind sprite
Animation
These terms are useful for creating animation with Lingo:
blend locV
ink member (sprite property)
loc regPoint
locH tweened
Behaviors
The terms in this section are useful for authoring behaviors and using behaviors while the movie plays.
Authoring behaviors
Use these terms to set up behaviors and the behavior’s Parameters dialog box:
ancestor on getBehaviorDescription
on runPropertyDialog on getPropertyDescriptionList
on getBehaviorTooltip property
on isOKToAttach
Sending messages to behaviors
Use these commands to send messages to behaviors attached to sprites:
call sendSprite
callAncestor sendAllSprites
Identifying behaviors
Use these terms to identify the behaviors attached to sprites:
currentSpriteNum scriptInstanceList
me spriteNum
Chapter 14
Bitmaps
The terms in this section are useful for working with bitmaps.
Bitmap properties
Use these terms to check and set bitmap properties:
alphaThreshold foreColor
backColor palette
blend picture (cast member property)
depth pictureP()
dither rect (member)
trimWhiteSpace (property) imageCompression
imageQuality movieImageCompression
movieImageQuality
Alpha channel
Use these terms to control alpha channel effects:
alphaThreshold dither
depth useAlpha
createMask() createMatte()
extractAlpha() setAlpha()
Image objects
Use these terms to create and control image objects:
copyPixels() fill()
crop() (image object command) image
draw() image()
duplicate() (image function) rect (image)
getPixel() setPixel()
Buttons
See Buttons and check boxes in the Interface Elements section.
Lingo by Feature 5
Cast members
The terms in this section are useful for working with cast members.
Creating cast members
importFileInto and new() to create cast members.
Use
Authoring
duplicate member, erase member, and pasteClipBoardInto to work with cast members
Use during authoring.
Graphic cast members
Use these terms to check and set the images assigned to graphic cast members:
center palette
crop (cast member property) picture (cast member property)
depth pictureP()
media regPoint
General cast member properties
Use these terms to check and set cast member properties:
fileName (cast member property) number (cast member property)
media preLoadMode
modified type (cast member property)
name (cast member property) URL
Graphic cast member dimensions
height, rect (member), and width to check and set dimensions for graphic cast members.
Use
Casts
The terms in this section are useful for working with casts.
Loading casts
preLoadMode to check and set when Director preloads a cast.
Use
Cast properties
Use these terms to specify cast properties:
castLib number (cast property)
fileName (cast property) number (system property)
name (cast property)
Chapter 16
Cast management
Use these terms to manage casts:
activeCastLib number of members
duplicate member pasteClipBoardInto
erase member save castLib
findEmpty() selection (cast property)
move member
Computer and operating system
Use these terms to check and control the computer:
beep freeBlock()
beepOn freeBytes()
cpuHogTicks maxInteger
emulateMultiButtonMouse multiSound
floatPrecision romanLingo
Operating system control
Use
restart and shutDown to control the operating system.
Data types
These terms are useful for specifying data types:
# (symbol) string()
float() stringP()
floatP() symbol()
integer() symbolP()
integerP() VOID
objectP() voidP()
Digital video
These terms are useful for working with AVI and QuickTime digital video:
controller trackNextSampleTime
digitalVideoTimeScale trackPreviousKeyTime
digitalVideoType trackPreviousSampleTime
directToStage trackStartTime (sprite property)
duration trackStartTime (cast member property)
frameRate trackStopTime (sprite property)
loop (cast member property) trackStopTime (cast member property)
movieRate trackText
Lingo by Feature 7
movieTime trackType (cast member property)
pausedAtStart (Flash, digital video) trackType (sprite property)
quickTimeVersion() trackCount (cast member property)
timeScale trackCount (sprite property)
trackEnabled video (QuickTime, AVI)
trackNextKeyTime videoForWindowsPresent
QuickTime
Use these terms to work with QuickTime:
enableHotSpot nodeType
fieldOfView nudge
getHotSpotRect() pan (QTVR property)
hotSpotExitCallback ptToHotSpotID()
hotSpotEnterCallback quickTimeVersion()
invertMask rotation
isVRMovie scale
loopBounds swing()
mask staticQuality
motionQuality tilt
mouseLevel translation
node triggerCallback
nodeEnterCallback warpMode
nodeExitCallback
RealMedia video
Use these terms to with RealMedia video:
audio (RealMedia) play
currentTime (RealMedia) realPlayerNativeAudio()
displayRealLogo realPlayerPromptToInstall()
duration (RealMedia) realPlayerVersion()
image (RealMedia) seek
lastError soundChannel (RealMedia)
mediaStatus state (RealMedia)
password stop (RealMedia)
pause (RealMedia) userName (RealMedia)
pausedAtStart (RealMedia) video (RealMedia)
percentBuffered
Chapter 18
Events
Use these event handlers for Lingo that runs when a specific event occurs:
activeCastLib on moveWindow
close window on mouseWithin
on cuePassed open window
on deactivateWindow on prepareFrame
on enterFrame on prepareMovie
on EvalScript on resizeWindow
on exitFrame on mouseUpOutside
on idle on rightMouseDown (event handler)
on keyDown on rightMouseUp (event handler)
on keyUp on startMovie
on mouseDown (event handler) on stepFrame
on mouseEnter on streamStatus
on mouseLeave on timeOut
on mouseUp (event handler) on zoomWindow
on stopMovie on beginSprite
on endSprite on hyperlinkClicked
Use the
pass and stopEvent commands to override the way that Director passes messages along
the message hierarchy.
External files
The terms in this section are useful for working with external files.
Path names and filenames
Use these terms to check and set path names and filenames:
@ (pathname) getNthFileNameInFolder()
applicationPath moviePath
fileName (cast property) searchCurrentFolder
fileName (cast member property) URL
Obtaining external media
Use these terms to obtain external media:
downloadNetThing preloadNetThing()
importFileInto
Lingo by Feature 9
Managing external files
Use these terms to manage external files:
closeXlib showXlib
open sound playFile
openXlib
Flash
These terms are useful for working with Flash cast members:
actionsEnabled originV
broadcastProps pathName (movie property)
bufferSize pausedAtStart (Flash, digital video)
buttonsEnabled percentStreamed
bytesStreamed play
callFrame() playBackMode
centerRegPoint playing
clearError posterFrame
clickMode print()
defaultRect printAsBitmap()
defaultRectMode quality
directToStage rewind sprite
endTellTarget() See tellTarget() rotation
eventPassMode scale
findLabel() scaleMode
fixedRate on sendXML
flashRect setCallback()
flashToStage() settingsPanel()
frame() (function) setFlashProperty()
frame (sprite property) setVariable()
frameCount showProps()
frameRate sound
frameReady() the soundMixMedia
getError() sourceFileName
getFlashProperty() stageToFlash()
getFrameLabel() state (Flash, SWA)
getVariable() static
goToFrame stop (Flash)
Chapter 110
hitTest() stream
hold streamMode
imageEnabled streamSize
linked tellTarget()
loop (keyword) URL
mouseOverButton viewH
newObject() viewPoint
obeyScoreRotation viewScale
originH viewV
originMode volume (cast member property)
originPoint
These terms are useful for working with global Flash objects, which do not require a Flash cast member:
clearAsObjects() setCallback()
newObject()
Frames
The Lingo terms in this section let you work with frames.
Frame events
Use the
on enterFrame, on exitFrame, and on prepareFrame event handlers to contain Lingo
that runs at specific events within a frame.
Frame properties
Use these Lingo terms to check and set frame properties:
frameLabel frameTempo
framePalette frameTransition
frameScript label()
frameSound1 labelList
frameSound2 marker()
the markerList
Lingo by Feature 11
Interface elements
The Lingo terms in this section are useful for working with interface elements.
Menus
Use these terms to create menus:
enabled name (menu item property)
installMenu number (menu items)
menu number (menus)
name (menu property) script
Buttons and check boxes
Use these terms to specify buttons and check boxes:
alert checkBoxType
buttonStyle checkMark
buttonType hilite (cast member property)
checkBoxAccess
Keys
The Lingo terms in this section are related to using the keyboard.
Identifying keys
Use these terms to identify keys:
charToNum() keyPressed()
commandDown mouseChar
controlDown numToChar()
key() optionDown
keyCode() shiftDown
Keyboard interaction
keyPressed(), lastEvent(), and lastKey to detect what the user types at the keyboard.
Use
Keyboard events
Use these terms to set up handlers that respond to pressing keys:
on keyDown keyDownScript
on keyUp keyUpScript
flushInputEvents
Chapter 112
Lingo
The Lingo terms in this section are important language elements that you use to construct scripts.
Boolean values
Use these terms to test whether a condition exists:
FALSE (0 is the numerical equivalent of FALSE).
TRUE (1 is the numerical equivalent of TRUE).
not
or
Script control
Use these terms to control how a script executes:
abort pass
do result
exit scriptsEnabled
halt scriptText
nothing stopEvent
Code structures
Use
if to create if..then statements. case, end case, and otherwise in case statements.
Use Use these terms for repeat loops:
end repeat repeat with
exit repeat repeat with...down to
next repeat repeat with...in list
repeat while
Syntax elements
Use these terms as part of Lingo’s syntax:
# (symbol) member (keyword)
" (string) of
¬ (continuation) or
-- (comment) property
() (parentheses) sprite
castLib the
end window
global
Lingo by Feature 13
Lists
The terms in this section are useful for working with lists.
Creating lists
[ ] (list), duplicate() (list function), or list() to create a list.
Use
Adding list items
Use these terms to add items to a list:
[ ] (bracket access) addVertex
add append
addVertex
Deleting list items
Use these terms to delete items from a list:
deleteAll deleteOne
deleteAt deleteProp
Retrieving values from a list
Use these terms to retrieve values from a list:
[ ] (bracket access) getOne()
deleteProp getPos()
deleteProp getProp()
getLast() getPropAt()
Getting information about lists
Use these terms to get information about lists:
count() max()
findPos min
findPosNear param()
ilk() paramCount()
listP()
Setting values in a list
Use these terms to set values in a list:
[ ] (bracket access) setAt
setaProp setProp
Chapter 114
Media synchronization
Use these terms to synchronize animation and sound:
cuePointNames on cuePassed
cuePointTimes isPastCuePoint()
mostRecentCuePoint
Memory management
The terms in this section are useful for determining memory requirements and controlling when the movie loads and unloads cast members.
Idle events
Use the
on idle event handler for Lingo that runs when the movie is idle.
Idle loading
Use these terms to control idle loading:
cancelIdleLoad idleLoadPeriod
finishIdleLoad idleLoadTag
idleHandlerPeriod idleReadChunkSize
idleLoadDone() netThrottleTicks
Preloading and querying media
Use these terms to load media into memory and check whether media are available:
frameReady() preloadNetThing()
loaded preLoadMember
mediaReady preLoadMovie
preLoad (command) preLoadRAM
preLoad (cast member property) purgePriority
preLoadBuffer member unLoad
preLoadEventAbort unLoadMember
preLoadMode unloadMovie
Available memory
Use these terms to check how much memory is available:
freeBlock() movieFileFreeSize
freeBytes() movieFileSize
memorySize
Lingo by Feature 15
Memory requirements
Use
ramNeeded() and size to determine how much memory required for a cast member or a
range of frames.
Menus
See Menus in the Interface elements section.
Message window
Use these terms to work in the Message window:
put traceLoad
showXlib traceLogFile
trace appMinimize
Monitor
Use colorDepth, deskTopRectList, and switchColorDepth to check and control the monitor.
Mouse interaction
The terms in this section are useful for Lingo related to using the mouse.
Mouse clicks
Use these terms to detect what the user does with the mouse:
clickOn mouseLine
doubleClick mouseLoc
emulateMultiButtonMouse mouseMember
lastClick() mouseOverButton
lastEvent() on mouseUp (event handler)
lastRoll mouseV
mouseChar mouseWord
on mouseDown (event handler) on rightMouseDown (event handler)
mouseH on rightMouseUp (event handler)
mouseItem rollOver()
mouseLevel stillDown
Chapter 116
Mouse events
Use these terms to set up handlers that respond to mouse events:
mouseDownScript on mouseUp (event handler)
mouseUpScript on mouseUpOutside
on mouseDown (event handler) on mouseWithin
on mouseEnter on rightMouseDown (event handler)
on mouseLeave on rightMouseUp (event handler)
Cursor control
Use
cursor (command), cursor (sprite property), and cursorSize to control the
pointer (cursor).
Movies in a window
The terms in this section are useful for working with movies in a window.
Movie in a window events
Use these event handlers to contain Lingo that you want to run in response to events in a movie in a window:
activeCastLib on openWindow
on closeWindow on resizeWindow
on moveWindow on zoomWindow
Opening and closing movies in a window
Use these terms for opening and closing windows:
close window open window
forget windowList
Window appearance
Use these terms to check and set the appearance of a movie’s window:
drawRect sourceRect
fileName (window property) tell
frontWindow title
modal titleVisible
moveToBack visible (window property)
moveToFront windowPresent()
name (window property) windowType
rect (window) appMinimize
Lingo by Feature 17
Communication between movies
Use the
tell command to send messages between movies.
Movies
The terms in this section are useful for managing movies.
Stopping movies
Use these terms to stop or quit the movie or projector:
exitLock quit
halt restart
pauseState shutDown
Movie information
Use these terms to obtain information about the movie and the movie’s environment:
environment moviePath
lastFrame number (system property)
movie runMode
movieFileFreeSize safePlayer
movieFileSize version
movieName movieFileVersion
Source control
Use these terms to manage Director projects being worked on by more than one person:
comments creationDate
modifiedBy modifiedDate
linkAs() seconds
Saving movies
saveMovie and updateMovieEnabled to save changes to a movie.
Use
Error checking
Use the
alertHook event to post alerts that describe errors in a projector.
Movie events
Use the
on prepareMovie, on startMovie, and on stopMovie event handlers for Lingo that
responds to movie events.
Chapter 118
Multiuser server
Director MX users should use Macromedia Flash Communication Server MX for communication among Director movies and with application servers. For more information about using Flash Communication Server MX, see Using Flash Communication Server MX in Using Director.
Navigation
Use these terms to jump to different locations:
delay goToFrame
go gotoNetMovie
go loop gotoNetPage
go next play
go previous play done
Network Lingo
The terms in this section are useful for working with the network.
Downloading and streaming media
Use these terms to obtain or stream media from the network:
downloadNetThing (For projectors and authoring only)
getNetText() postNetText
gotoNetMovie preloadNetThing()
gotoNetPage
Checking availability
frameReady() and mediaReady to check whether specific media are
Use completely downloaded.
Using network operations
Use these terms to check the progress of a network operation or get information regarding network media:
getStreamStatus() netMIME()
getLatestNetID netTextResult()
netAbort on streamStatus
netDone() proxyServer
netError() tellStreamStatus()
netPresent URLEncode
netLastModDate()
Lingo by Feature 19
Working with the local computer
Use these terms to work with the user’s computer:
browserName() clearCache (For projectors and
cacheDocVerify() (For projectors and authoring only)
cacheSize() (For projectors and authoring only)
authoring only)
getPref()
setPref
Browsers
Use
on EvalScript, externalEvent, and netStatus to interact with browsers. For additional
information about browser scripting using languages such as JavaScript, see “Shockwave Publishing” on the Director Support Center at www.macromedia.com/support/director/ internet.html.
Accessing EMBED and OBJECT tag parameters
externalParamCount(), externalParamName(), and externalParamValue() to access
Use
EMBED and OBJECT parameter tags:
Operators
The terms in this section are operators available in Lingo.
Math operators
Use these terms for math statements:
* (multiplication) <> (not equal)
/ (division) > (greater than)
+ (addition) >= (greater than or equal to)
- (minus) < (less than)
= (equals) <= (less than or equal to)
Comparison operators
and, not, and or to compare expressions.
Use
Palettes and color
Use these terms to check and set palettes for movies and for cast members:
color() paletteMapping
depth puppetPalette
palette rgb()
Chapter 120
Parent scripts
Use these terms to work with parent scripts and child objects:
actorList property
ancestor on stepFrame
new() handler()
handlers() rawNew()
Points and rectangles
These terms are useful for checking and setting points and rectangles.
inflate quad
inside() rect (camera)
intersect() rect (sprite)
map() sourceRect
offset() (rectangle function) union()
point()
For Lingo that controls a sprite’s bounding rectangle, see Sprite dimensions.
Projectors
These terms are useful for working with projectors:
alertHook platform
environment runMode
editShortCutsEnabled
Puppets
Use these terms to control the puppet property of sprites and effects channels:
puppet puppetTempo
puppetPalette puppetTransition
puppetSound updateStage
puppetSprite
Random numbers
Use random() and randomSeed to generate random numbers.
Lingo by Feature 21
Score
The following terms let you work with the Score.
Score properties
lastFrame, score, and scoreSelection to work with the movie’s Score.
Use
Score generation
Use these terms to create Score content from Lingo:
beginRecording scoreSelection
clearFrame scriptNum
deleteFrame scriptType
duplicateFrame tweened
endRecording updateFrame
insertFrame updateLock
scoreColor
Shapes
Use these Lingo terms to work with shapes:
filled pattern
lineDirection shapeType
lineSize
Shockwave audio
Use these terms to check, stream, and play Shockwave audio sounds:
bitRate play member
bitsPerSample preLoadBuffer member
copyrightInfo preLoadTime
duration sampleRate
getError() soundChannel (SWA)
getErrorString() state (Flash, SWA)
numChannels stop member
pause (movie playback) streamName
percentPlayed URL
percentStreamed volume (cast member property)
Chapter 122
Sound
The terms in this section are useful for playing sounds.
Sound information
Use these terms to get information about a sound:
channelCount soundEnabled
sound volume (sprite property)
soundBusy() isBusy()
sampleCount status
Playing sound
Use these terms to control how sound plays:
puppetSound sound fadeOut
sound close sound playFile
sound fadeIn sound stop
breakLoop() elapsedTime
endTime fadeIn()
fadeOut() fadeTo()
getPlaylist() setPlaylist()
loopCount loopEndTime
loopStartTime loopsRemaining
member (sound property) pan (sound property)
pause() (sound playback) playNext()
queue() rewind()
stop() (sound) play() (sound)
RealMedia sound
See Digital video.
Sprites
The Lingo terms in this section are for sprites.
Sprite events
Use the
on beginSprite and on endSprite event handlers to contain Lingo that you want to
run when a sprite begins or ends.
Assigning cast members to sprites
castLibNum, member (sprite property), or memberNum to specify a sprite’s cast member.
Use
Lingo by Feature 23
Rotating sprites
Use the
rotation sprite property to rotate sprites.
Dragging sprites
Use these terms to set how the user can drag sprites:
constrainH() moveableSprite
constrainV() sprite...intersects
constraint sprite...within
Sprites and Lingo
Use these terms to manage how Lingo controls sprites:
puppetSprite spriteNum
puppet sendSprite
scriptNum sendAllSprites
scriptInstanceList
Drawing sprites on the Stage
Use these terms to control how Director draws a sprite on the Stage:
blend skew
flipH trails
flipV tweened
ink updateStage
quad visible (sprite property)
rotation
Sprite dimensions
Use these terms to check and set the size of a sprite’s bounding rectangle:
bottom right
height top
left width
quad zoomBox
You can also manipulate a sprite’s bounding rectangle with Lingo for rectangles. See Points and rectangles.
Sprite locations
Use the
Chapter 124
loc, locH, and locV sprite properties to check and set sprite locations.
Sprite color
Use these terms to check and set a sprite’s color:
backColor color (sprite and cast member property)
bgColor foreColor
Stage
These terms are useful for controlling the Stage and determining its size and location:
centerStage stageColor
fixStageSize stageLeft
picture (window property) stageRight
stage stageTop
stageBottom updateStage
Tempo
Use the puppetTempo command to control a movie’s tempo.
Text
The terms in this section are useful for working with text, strings, and fields.
Manipulating strings
Use these terms to manipulate strings:
& (concatenator) put...before
&& (concatenator) put...into
delete string()
hilite (cast member property) stringP()
put...after text
Chunk expressions
Use these terms to identify chunks of text:
char...of number (words)
chars() offset() (string function)
contains paragraph
EMPTY ref
item...of selection (text cast member property)
itemDelimiter selectedText
last() selEnd (fields only)
length() selStart (fields only)
Lingo by Feature 25
line...of string()
number (characters) stringP()
number (items) value()
number (lines) word...of
Editable text
Use the
editable property to specify whether text is editable.
Shocked fonts
Use these terms to include Shocked fonts with downloaded text:
recordFont bitmapSizes
originalFont characterSet
Character formatting
Use these terms to format text:
backColor fontf
bgColor fontSize
charSpacing fontStyle
color() foreColor
dropShadow
Paragraph formatting
Use these terms to format paragraphs:
alignment rightIndent
bottomSpacing tabCount
firstIndent tabs
fixedLineSpace top (3D)
leftIndent wordWrap
margin
Text cast member properties
Use these terms to work with the entire text content of a text cast member:
antiAlias kerning
antiAliasThreshold kerningThreshold
autoTab picture (cast member property)
HTML RTF
Lingo that applies to chunk expressions is also available to the text within a text cast member.
Chapter 126
Mouse pointer position in text
Use these terms to detect where the mouse pointer is within text:
pointInHyperlink() pointToParagraph()
pointToChar() pointToWord()
pointToItem()
Text boxes for field cast members
Use these terms to set up the box for a field cast member:
border lineHeight() (function)
boxType lineHeight (cast member property)
lineCount pageHeight
Scrolling text
Use these terms to work with scrolling text:
linePosToLocV() scrollByLine
locToCharPos() scrollByPage
locVToLinePos() scrollTop
Constants
Use these terms to work with constants:
BACKSPACE RETURN (constant)
EMPTY VOID
ENTER
Time
The terms in this section are useful for working with time.
Current date and time
Use these terms to determine the current date and time:
abbr, abbrev, abbreviated short
date() (system clock) systemDate
long
Lingo by Feature 27
Measuring time
Use these terms to measure time in a movie:
framesToHMS() ticks
HMStoFrames() time()
milliseconds timer
startTimer
Timeouts
Use these terms to handle timeouts:
timeoutKeyDown timeoutMouse
timeoutLapsed timeoutPlay
timeoutLength timeoutScript
name (timeout property) period
persistent target
time() timeout()
timeoutHandler timeoutList
Transitions
Use these terms to work with transitions:
changeArea puppetTransition
chunkSize transitionType
duration
Variables
The terms in this section are useful for creating and changing variables:
Creating variables
Use these terms to create variables:
= (equals) property
global
Testing and changing variables
Use these terms to check and change the values assigned to variables:
= (equals) put
clearGlobals set...to, set...=
globals showGlobals
ilk() showLocals
Chapter 128
Vector shapes
Use these Lingo terms to work with vector shapes:
addVertex gradientType
antiAlias imageEnabled
backgroundColor moveVertex()
broadcastProps moveVertexHandle()
centerRegPoint originH
closed originMode
defaultRect originPoint
defaultRectMode originV
deleteVertex() rotation
directToStage scale
endColor scaleMode
fillColor showProps()
fillCycles skew
fillDirection static
fillMode strokeColor
fillOffset strokeWidth
fillScale vertexList
flashRect viewPoint
flipH viewScale
flipV viewV
curve newCurve()
regPointVertex
XML parsing
The following Lingo is useful for XML parsing within Director.
attributeName ignoreWhiteSpace()
attributeValue makeList()
child (XML) makeSubList()
count() name (XML property)
doneParsing() parseString()
getError() (XML) parseURL()
Lingo by Feature 29
Xtra extensions
Use these terms to work with Xtra extensions:
movieXtraList xtra
name (system property) xtraList
number of xtras xtras
Chapter 130
CHAPTER 2
3D Lingo by Feature
This chapter lists the various 3D features of Macromedia Director MX and the corresponding Lingo elements that you can use to implement those features.
Animation
Use these terms to work with 3D animation. See also the lists of terms for the Keyframe player and Bones player modifiers.
animationEnabled pause() (3D)
autoblend play() (3D)
blendTime playing (3D)
cloneMotionFromCastmember playlist
count playNext() (3D)
currentLoopState playRate
currentTime (3D) positionReset
deleteMotion queue() (3D)
lockTranslation removeLast()
motion rotationReset
name type (motion)
newMotion()
Anti-aliasing
Use these terms to work with anti-aliasing:
antiAliasingEnabled antiAliasingSupported
31
Backdrops and overlays
Use these terms to manipulate backdrops and overlays in 3D cast members:
addBackdrop regPoint (3D)
addOverlay removeBackdrop
blend (3D) removeOverlay
count rotation (backdrop and overlay)
insertBackdrop scale (backdrop and overlay)
insertOverlay source
loc (backdrop and overlay)
Bones player modifier
Use these terms to control the functionality of the Bones player modifier:
autoblend play() (3D)
blendTime playing (3D)
bonesPlayer (modifier) playlist
count playNext() (3D)
currentTime (3D) playRate
getBoneID queue() (3D)
currentLoopState removeLast()
getWorldTransform() rootLock
lockTranslation rotationReset
positionReset transform (property)
pause() (3D)
Cameras
Use these terms to work with cameras and camera properties:
addCamera orthoHeight
addToWorld pointAt
autoCameraPosition pointAtOrientation
boundingSphere position (transform)
camera projection
cameraCount() projectionAngle
cameraPosition rect (camera)
cameraRotation removeFromWorld
clone rootNode
cloneDeep rotate
Chapter 232
count scale (transform)
deleteCamera transform (property)
fieldOfView (3D) translate
hither userData
isInWorld() worldPosition
name yon
newCamera
Child and parent nodes
Use these terms to control parent-child relationships between models:
addChild count
child parent
Collision detection
These terms are useful for detecting and responding to collisions between models:
collision (modifier) pointOfContact
collisionData registerForEvent()
collisionNormal registerScript()
enabled (collision) resolve
immovable resolveA
window("Tool Panel").modal = FALSE resolveB
modelA setCollisionCallback()
modelB
Creating and removing objects
Use these terms to create and remove objects:
add (3D texture) deleteShader
addBackdrop deleteTexture
addModifier duplicate
addOverlay insertBackdrop
addToWorld insertOverlay
camera newLight
child newMesh
clone newModel
cloneDeep newModelResource
cloneModelFromCastmember newMotion()
3D Lingo by Feature 33
cloneMotionFromCastmember newShader
deleteCamera newTexture
deleteGroup removeModifier
deleteLight removeBackdrop
deleteModel removeFromWorld
deleteModelResource removeOverlay
deleteMotion
Fog
Use these terms to work with fog:
color (fog) far (fog)
decayMode fog
enabled (fog) near (fog)
Groups
Use these terms to work with groups:
addChild newGroup
addToWorld pointAt
boundingSphere pointAtOrientation
child position (transform)
clone removeFromWorld
cloneDeep rotate
count scale (transform)
deleteGroup transform (property)
group translate
isInWorld() userData
name worldPosition
Inker modifier
Use these terms to control the functionality of the Inker modifier:
boundary lineColor
creaseAngle lineOffset
creases silhouettes
inker (modifier) useLineOffset
Chapter 234
Keyframe player modifier
Use these terms to control the functionality of the Keyframe player modifier:
autoblend playing (3D)
blendFactor playlist
blendTime playNext() (3D)
count playRate
currentLoopState positionReset
currentTime (3D) queue() (3D)
keyframePlayer (modifier) removeLast()
lockTranslation rootLock
pause() (3D) rotationReset
play() (3D) update
Level of detail modifier
Use these terms to control the functionality of the level of detail (LOD) modifier:
auto level
bias lod (modifier)
Lights
Use these terms to work with lights and light properties:
addToWorld pointAt
ambientColor pointAtOrientation
attenuation position (transform)
boundingSphere removeFromWorld
color (light) rotate
count scale (transform)
clone specular (light)
cloneDeep spotAngle
deleteLight spotDecay
directionalColor transform (property)
directionalPreset translate
isInWorld() type (light)
light userData
name worldPosition
newLight
3D Lingo by Feature 35
Mesh deform modifier
Use these terms to control the functionality of the mesh deform modifier:
add (3D texture) normalList
face textureCoordinateList
mesh (property) textureLayer
meshDeform (modifier) vertexList (mesh deform)
neighbor
Miscellaneous
clearAtRender resetWorld
clearValue revertToWorldDefaults
directToStage sendEvent
loadFile() setCollisionCallback()
registerForEvent() unregisterAllEvents
registerScript() revertToWorldDefaults
Model resources
Use these terms to work with 3D model resources:
count newModelResource
deleteModelResource resolution
modelResource resource
name type (model resource)
Models
Use these terms to work with 3D models:
addToWorld position (transform)
boundingSphere removeFromWorld
clone renderStyle
cloneDeep resource
cloneModelFromCastmember rotate
count scale (transform)
deleteModel shadowPercentage
isInWorld() shaderList
model transform (property)
modifier translate
Chapter 236
name userData
newModel visibility
pointAt worldPosition
pointAtOrientation
Modifiers
These terms are useful for applying modifiers to models and model resources. See the name of the specific modifier you are using for a list of terms that work with that modifier.
addModifier modifiers
count removeModifier
modifier
Movie and system properties
Use these terms to determine the 3D capabilities of the playback computer:
active3dRenderer getRendererServices()
colorBufferDepth preferred3DRenderer
depthBufferDepth renderer
getHardwareInfo() rendererDeviceList
Nodes
Use these terms to manage nodes. A node is any object that exists in the world, including lights, cameras, models, and groups.
addToWorld isInWorld()
clone name
cloneDeep removeFromWorld
count userData
Particle systems
See Primitives.
Picking
See Selecting models.
3D Lingo by Feature 37
Primitives
The following sections list the terms used to work with each type of primitive. Use the primitives property to determine which types of primitives are supported by the
current 3D renderer.
Boxes
Use these terms to control properties of 3D boxes:
back length (3D)
bottom (3D) lengthVertices
front right (3D)
height (3D) top (3D)
heightVertices width (3D)
left (3D) widthVertices
Cylinders
Use these terms to control properties of 3D cylinders:
bottomCap resolution
bottomRadius state (3D)
endAngle topCap
height (3D) topRadius
numSegments
Meshes
Use these terms to control properties of 3D meshes:
build() normalList
colorList shadowPercentage
count textureCoordinateList
face textureCoordinates
generateNormals() vertexList (mesh deform)
newMesh
Particle systems
Use these terms to control properties of 3D particle systems:
angle minSpeed
blendRange window("Tool Panel").modal = FALSE
colorRange numParticles
direction path
Chapter 238
distribution pathStrength
drag region
gravity sizeRange (contains end and start)
lifetime texture
loop (emitter) tweenMode
maxSpeed wind
Planes
Use these terms to control properties of 3D planes:
length (3D) width (3D)
lengthVertices widthVertices
Spheres
Use these terms to control properties of 3D spheres:
endAngle resolution
radius state (3D)
Selecting models
Use these terms to enable individual models in a 3D cast member to be selected and respond to mouse clicks. This is also known as picking.
modelsUnderLoc spriteSpaceToWorldSpace
modelsUnderRay worldSpaceToSpriteSpace
modelUnderLoc
Shaders
Use these terms to work with shaders:
ambient renderStyle
blend (3D) shadowPercentage
blendConstant shaderList
blendConstantList shadowPercentage
blendFunction shadowStrength
blendFunctionList silhouettes
blendSource specular (shader)
blendSourceList specularColor
count specularLightMap
deleteShader style
diffuse textureMode
3D Lingo by Feature 39
diffuseColor textureModeList
diffuseLightMap textureRepeat
emissive textureRepeatList
flat textureTransform
glossMap textureTransformList
name transparent
newShader type (shader)
renderStyle useDiffuseWithTexture
region wrapTransformList
reflectivity
Engraver shader
Use these terms to work with the Engraver shader:
density rotation (engraver shader)
brightness
Newsprint shader
Use these terms to work with the Newsprint shader:
density brightness
Painter shader
Use these terms to work with the Painter shader:
colorSteps shadowPercentage
highlightPercentage shadowStrength
highlightStrength style
Sprites (3D)
rect (camera) registerForEvent()
Use these terms to control properties of 3D sprites:
Streaming
Use these terms to control the streaming of 3D cast members:
bytesStreamed (3D) state (3D)
preLoad (3D) streamSize (3D)
Chapter 240
Subdivision surfaces modifier
Use these terms to control the functionality of the subdivision surfaces (SDS) modifier:
depth (3D) sds (modifier)
enabled (sds) subdivision
error tension
Text (3D)
Use these terms to control the appearance of 3D text:
autoCameraPosition displayMode
bevelDepth extrude3D
bevelType smoothness
displayFace tunnelDepth
Textures
Use these terms to work with textures:
compressed newTexture
count quality (3D)
deleteTexture renderFormat
height (3D) texture
member textureRenderFormat
name textureType
nearFiltering type (texture)
Toon modifier
Use these terms to control the functionality of the Toon modifier:
boundary lineOffset
colorSteps shadowPercentage
creaseAngle shadowStrength
creases silhouettes
highlightPercentage style
highlightStrength toon (modifier)
lineColor useLineOffset
3D Lingo by Feature 41
Transforms
Use these terms to work with transforms:
duplicate preRotate
getWorldTransform() preScale()
identity() preTranslate()
interpolate() rotate
interpolateTo() rotation (transform)
inverse() scale (transform)
invert() transform (property)
multiply() translate
pointAt worldPosition
pointAtOrientation xAxis
position (transform) yAxis
preMultiply zAxis
Vector math
Use these terms to perform vector math operations:
angleBetween getNormalized
axisAngle magnitude
cross normalize
crossProduct() randomVector
distanceTo() vector()
dot() x (vector property)
dotProduct() y (vector property)
duplicate z (vector property)
Chapter 242
CHAPTER 3
Lingo Dictionary
This dictionary describes the syntax and use of Lingo elements in Macromedia Director MX. Nonalphabetical operators are presented first, followed by all other operators in alphabetical order.
The entries in this dictionary are the same as those in Director Help. To use examples in a script, copy the example text from Director Help and paste it in the Script window.
# (symbol)
Syntax
#symbolName
Description
Symbol operator; defines a symbol, a self-contained unit that can be used to represent a condition or flag. The value number of alphabetical or numerical characters.
A symbol can do the following:
symbolName begins with an alphabetical character and may be followed by any
Assign a value to a variable.
Compare strings, integers, rectangles, and points.
Pass a parameter to a handler or method.
Return a value from a handler or method.
A symbol takes up less space than a string and can be manipulated, but unlike a string it does not consist of individual characters. You can convert a symbol to a string for display purposes by using the
string function.
The following are some important points about symbol syntax:
Symbols are not case-sensitive.
Symbols can’t start with a number.
Spaces may not be used, but you can use underscore characters to simulate them.
Symbols use the 128 ASCII characters, and letters with diacritical or accent marks are treated
as their base letter.
Periods may not be used in symbols.
43
All symbols, global variables, and names of parameters passed to global variables are stored in a common lookup table.
Example
This statement sets the state variable to the symbol #Playing:
state = #Playing
See also
ilk(), string(), symbol(), symbolP()
. (dot operator)
Syntax
objectReference.objectProperty textExpression.objectProperty object.commandOrFunction()
Description
Operator; used to test or set properties of objects, or to issue a command or execute a function of the object. The object may be a cast member, a sprite, a property list, a child object of a parent script, or a behavior.
Examples
This statement displays the current member contained by the sprite in channel 10:
put sprite(10).member
To use the alternate syntax and call a function, you can use this form:
myColorObject = color(#rgb, 124, 22, 233) put myColorObject.ilk()
-- #color
- (minus)
Syntax
(Negation): -expression
Description
Math operator; reverses the sign of the value of expression. This is an arithmetic operator with a precedence level of 5.
Syntax
(Subtraction): expression1 - expression2
Description
Math operator; performs an arithmetic subtraction on two numerical expressions, subtracting
expression2 from expression1. When both expressions are integers, the difference is an
integer. When either or both expressions are floating-point numbers, the difference is a floating-point number.
This is an arithmetic operator with a precedence level of 3.
Chapter 344
Examples
(Negation): This statement reverses the sign of the expression 2 + 3:
put -(2 + 3)
The result is -5. (Subtraction)
: This statement subtracts the integer 2 from the integer 5 and displays the result in
the Message window:
put 5 - 2
The result is 3, which is an integer. (Subtraction)
: This statement subtracts the floating-point number 1.5 from the floating-point
number 3.25 and displays the result in the Message window:
put 3.25 - 1.5
The result is 1.75, which is a floating-point number.
-- (comment)
Syntax
-- comment
Description
Comment delimiter; indicates the beginning of a script comment. On any line, anything that appears between the comment delimiter (double hyphen) and the end-of-line return character is interpreted as a comment rather than a Lingo statement.
The Director player for Java accepts Lingo that uses this delimiter, but comments do not appear in the final Java code.
Example
This handler uses a double hyphen to make the second, fourth, and sixth lines comments:
on resetColors
-- This handler resets the sprite’s colors. sprite(1).forecolor = 35
-- bright red sprite(1).backcolor = 36
-- light blue
end
& (concatenator)
Syntax
expression1 & expression2
Description
String operator; performs a string concatenation of two expressions. If either expression1 or
expression2 is a number, it is first converted to a string. The resulting expression is a string.
This is a string operator with a precedence level of 2. Be aware that Lingo allows you to use some commands and functions that take only one argument
without parentheses surrounding the argument. When an argument phrase includes an operator, Lingo interprets only the first argument as part of the function, which may confuse Lingo.
Lingo Dictionary 45
For example, the open window command allows one argument that specifies which window to open. If you use the
& operator to define a pathname and filename, Director interprets only the
string before the & operator as the filename. For example, Lingo interprets the statement open
window the applicationPath & "theMovie" ("theMovie")
. Avoid this problem by placing parentheses around the entire phrase that includes
as (open window the applicationPath) &
an operator, as follows:
open window (the applicationPath & "theMovie")
The parentheses clear up Lingo’s confusion by changing the precedence by which Lingo deals with the operator, causing Lingo to treat the two parts of the argument as one complete argument.
Examples
This statement concatenates the strings “abra” and “cadabra” and displays the resulting string in the Message window:
put "abra" & "cadabra"
The result is the string “abracadabra”. This statement concatenates the strings “$” and the content of the
price variable and then
assigns the concatenated string to the Price field cast member:
member("Price").text = "$" & price
&& (concatenator)
Syntax
expression1 && expression2
Description
String operator; concatenates two expressions, inserting a space character between the original string expressions. If either string. The resulting expression is a string.
This is a string operator with a precedence level of 2.
Examples
This statement concatenates the strings “abra” and “cadabra” and inserts a space between the two:
put "abra" && "cadabra"
The result is the string “abra cadabra”. This statement concatenates the strings “Today is” and today’s date in the long format and inserts
a space between the two:
expression1 or expression2 is a number, it is first converted to a
put "Today is" && the long date
If today’s date is Tuesday, July 30, 2000, the result is the string “Today is Tuesday, July 30, 2000”.
Chapter 346
() (parentheses)
Syntax
(expression)
Description
Grouping operator; performs a grouping operation on an expression to control the order of execution of the operators in an expression. This operator overrides the automatic precedence order so that the expression within the parentheses is evaluated first. When parentheses are nested, the contents of the inner parentheses are evaluated before the contents of the outer ones.
This is a grouping operator with a precedence level of 5. Be aware that Lingo allows you to use some commands and functions that take only one argument
without parentheses surrounding the argument. When an argument phrase includes an operator, Lingo interprets only the first argument as part of the function, which may confuse Lingo.
For example, the open. If you use the
open window command allows one argument that specifies which window to
& operator to define a pathname and filename, Director interprets only the
string before the & operator as the filename. For example, Lingo interprets the statement open
window the applicationPath & "theMovie" ("theMovie")
. Avoid this problem by placing parentheses around the entire phrase that includes
as (open window the applicationPath) &
an operator, as follows:
open window (the applicationPath & "theMovie")
Example
These statements use the grouping operator to change the order in which operations occur (the result appears below each statement):
put (2 + 3) * (4 + 5)
-- 45 put 2 + (3 * (4 + 5))
-- 29 put 2 + 3 * 4 + 5
-- 19
* (multiplication)
Syntax
expression1 * expression2
Description
Math operator; performs an arithmetic multiplication on two numerical expressions. If both expressions are integers, the product is an integer. If either or both expressions are floating-point numbers, the product is a floating-point number.
This is an arithmetic operator with a precedence level of 4.
Examples
This statement multiplies the integers 2 and 3 and displays the result in the Message window:
put 2 * 3
The result is 6, which is an integer.
Lingo Dictionary 47
This statement multiplies the floating-point numbers 2.0 and 3.1414 and displays the result in the Message window:
put 2.0 * 3.1416
The result is 6.2832, which is a floating-point number.
+ (addition)
Syntax
expression1 + expression2
Description
Math operator; performs an arithmetic sum on two numerical expressions. If both expressions are integers, the sum is an integer. If either or both expressions are floating-point numbers, the sum is a floating-point number.
This is an arithmetic operator with a precedence level of 4.
Examples
This statement adds the integers 2 and 3 and then displays the result, 5, an integer, in the Message window:
put 2 + 3
This statement adds the floating-point numbers 2.5 and 3.25 and displays the result, 5.7500, a floating-point number, in the Message window:
put 2.5 + 3.25
+ (addition) (3D)
Syntax
vector1 + vector2 vector + scalar
Description
3D vector operator; adds the components of two vectors, or adds the scalar value to each component of the vector and returns a new vector.
vector1 + vector2 adds the components of vector1 to the corresponding to components of vector2 and returns a new vector.
vector + scalar adds the scalar value to each of the components of the vector and returns a
new vector.
- (subtraction)
Syntax
vector1 - vector2 vector - scalar
Description
3D vector operator; subtracts the components of vector2 from the corresponding components of
vector1, or subtracts the scalar value from each of the components and returns a new vector.
Chapter 348
vector1 - vector2 subtracts the values of vector2 from the corresponding components in vector1 and returns a new vector.
vector - scaler subtracts the value of the scalar from each of the components in the vector and
returns a new vector.
* (multiplication)
Syntax
vector1 * vector2 vector * scalar transform * vector
Description
3D vector operator; multiplies the components of vector1 by the corresponding components in
vector2, and returns the dot product, or multiplies each of the components the vector by the
scalar value and returns a new vector.
vector1 * vector2 returns the dot product of the two vectors, which is not a new vector. This
operation is the same as vector1.dotproduct.vector2.
vector
* scalar multiplies each of the components in the vector by the scalar value and returns
a new vector.
transform * vector multiplies the transform by the vector and returns a new vector. The new
vector is the result of applying the positional and rotational changes defined by transform to the
vector. Note that vector * transform is not supported.
See also
dotProduct()
/ (division)
Syntax
expression1 / expression2
Description
Math operator; performs an arithmetic division on two numerical expressions, dividing
expression1 by expression2. If both expressions are integers, the quotient is an integer. If
either or both expressions are floating-point numbers, the quotient is a floating-point number. This is an arithmetic operator with a precedence level of 4.
Examples
This statement divides the integer 22 by 7 and then displays the result in the Message window:
put 22 / 7
The result is 3. Because both numbers in the division are integers, Lingo rounds the answer down to the nearest integer.
This statement divides the floating-point number 22.0 by 7.0 and then displays the result in the Message window:
put 22.0 / 7.0
The result is 3.1429, which is a floating-point number.
Lingo Dictionary 49
/ (division) (3D)
Syntax
vector / scalar
Description
3D vector operator; divides each of the vector components by the scalar value and returns a new vector.
< (less than)
Syntax
expression1 < expression2
Description
Comparison operator; compares two expressions and determines whether expression1 is less than
expression2 (TRUE), or whether expression1 is greater than or equal to expression2 (FALSE).
This operator can compare strings, integers, floating-point numbers, rects, and points. Be aware that comparisons performed on rects or points are handled as if the terms were lists, with each element of the first list compared to the corresponding element of the second list.
This is a comparison operator with a precedence level of 1.
<= (less than or equal to)
Syntax
expression1 <= expression2
Description
Comparison operator; compares two expressions and determines whether expression1 is less than or equal to expression2 (TRUE), or whether expression1 is greater than expression2 (FALSE).
This operator can compare strings, integers, floating-point numbers, rects, and points. Be aware that comparisons performed on rects or points are handled as if the terms were lists, with each element of the first list compared to the corresponding element of the second list.
This is a comparison operator with a precedence level of 1.
<> (not equal)
Syntax
expression1 <> expression2
Description
Comparison operator; compares two expressions, symbols, or operators and determines whether
expression1 is not equal to expression2 (TRUE), or whether expression1 is equal to expression2 (FALSE).
This operator can compare strings, integers, floating-point numbers, rects, and points. Be aware that comparisons performed on rects or points are handled as if the terms were lists, with each element of the first list compared to the corresponding element of the second list.
This is a comparison operator with a precedence level of 1.
Chapter 350
= (equals)
Syntax
expression1 = expression2
Description
Comparison operator; compares two expressions, symbols, or objects and determines whether
expression1 is equal to expression2 (TRUE), or whether expression1 is not equal to expression2 (FALSE).
This operator can compare strings, integers, floating-point numbers, rects, lists, and points. Lists are compared based on the number of elements in the list. The list with more elements is
considered larger than the than the list with fewer elements. This is a comparison operator with a precedence level of 1.
> (greater than)
Syntax
expression1 > expression2
Description
Comparison operator; compares two expressions and determines whether expression1 is greater than
expression2 (TRUE), or whether expression1 is less than or equal to expression2 (FALSE).
This operator can compare strings, integers, floating-point numbers, rects, and points. Be aware that comparisons performed on rects or points are handled as if the terms were lists, with each element of the first list compared to the corresponding element of the second list.
This is a comparison operator with a precedence level of 1.
>= (greater than or equal to)
Syntax
expression1 >= expression2
Description
Comparison operator; compares two expressions and determines whether expression1 is greater than or equal to
This operator can compare strings, integers, floating-point numbers, rects, and points. Be aware that comparisons performed on rectangles or points are handled as if the terms were lists, with each element of the first list compared to the corresponding element of the second list.
This is a comparison operator with a precedence level of 1.
expression2 (TRUE), or whether expression1 is less than expression2 (FALSE).
Lingo Dictionary 51
[ ] (bracket access)
Syntax
textExpression[chunkNumberBeingAddressed] textExpression[firstChunk..lastChunk]
Description
Operator; allows a chunk expression to be addressed by number. Useful for finding the nth chunk in the expression. The chunk can be a word, line, character, paragraph, or other Text cast member chunk.
Example
This outputs the first word of the third line in the text cast member First Names:
put member("First Names").text.line[3].word[1]
[ ] (list)
Syntax
[entry1, entry2, entry3, ...]
Description
List operator; specifies that the entries within the brackets are one of four types of lists:
Unsorted linear lists
Sorted linear lists
Unsorted property lists
Sorted property lists
Each entry in a linear list is a single value that has no other property associated with it. Each entry in a property list consists of a property and a value. The property appears before the value and is separated from the value by a colon. You cannot store a property in a linear list. When using strings as entries in a list, enclose the string in quotation marks.
For example, [6, 3, 8] is a linear list. The numbers have no properties associated with them. However, [#gears:6, #balls:3, #ramps:8] is a property list. Each number has a property—in this case, a type of machinery—associated with it. This property list could be useful for tracking the number of each type of machinery currently on the Stage in a mechanical simulation. Properties can appear more than once in a property list.
Lists can be sorted in alphanumeric order. A sorted linear list is ordered by the values in the list. A sorted property list is ordered by the properties in the list. You sort a list by using the appropriate command for a linear list or property list.
In linear lists, symbols and strings are case sensitive.
In property lists, symbols aren’t case sensitive, but strings are case sensitive.
A linear list or property list can contain no values at all. An empty list consists of two square brackets ([ ]). To create or clear a linear list, set the list to the list to [:].
[ ]. To create or clear a property list, set
You can modify, test, or read items in a list.
Chapter 352
Lingo treats an instance of a list as a reference to the list. This means each instance is the same piece of data, and changing it will change the original. Use the
duplicate command to create
copies of lists. Lists are automatically disposed when they are no longer referred to by any variable. When a list is
held within a global variable, it persists from movie to movie. You can initialize a list in the
on prepareMovie handler or write the list as a field cast member,
assign the list to a variable, and then handle the list by handling the variable. Not all PC keyboards have square brackets. If square brackets aren’t available, use the
list
function to create a linear list. For a property list, create the list pieces as a string before converting them into a useful list.
myListString = numToChar(91) & ":" & numToChar(93) put myListString
-- "[:]" myList = myListString.value put myList
-- [:] put myList.listP
-- 1 myList[#name] = "Brynn" put myList
-- [#name: "Brynn"]
Examples
This statement defines a list by making the machinery variable equal to the list:
set machinery = [#gears:6, #balls:3, #ramps:8]
This handler sorts the list aList and then displays the result in the Message window:
on sortList aList
alist.sort() put aList
end sortList
If the movie issues the statement sortList machinery, where machinery is the list in the preceding example, the result is [#balls:3, #gears:6, #ramps:8].
This statement creates an empty linear list:
set x = [ ]
This statement creates an empty property list:
set x = [:]
See also
add, addVertex, append, count(), deleteAt, duplicate() (list function), findPos, findPosNear, getProp(), getAt, getLast(), getPos(), ilk(), list(), max(), min, setAt, setaProp, sort
Lingo Dictionary 53
" (string)
Syntax
"
Description
String constant; when used before and after a string, quotation marks indicate that the string is a literal—not a variable, numerical value, or Lingo element. Quotation marks must always surround literal names of cast members, casts, windows, and external files.
Example
This statement uses quotation marks to indicate that the string “San Francisco” is a literal string, the name of a cast member:
put member("San Francisco").loaded
See also
QUOTE
¬ (continuation)
Description
The ¬ symbol is obsolete. Use the \ character instead. See \ (continuation). It is recommended that you replace this symbol with the
\ symbol in your older scripts.
\ (continuation)
Syntax
first part of a statement on this line \ second part of the statement \ third part of the statement
Description
Continuation symbol; when used as the last character in a line, indicates that the statement continues on the next line. Lingo then interprets the lines as one continuous statement.
Example
This statement uses the \ character to wrap the statement onto two lines:
set the memberNum of sprite mySprite \ to member "This is a long cast name."
@ (pathname)
Syntax
@pathReference
Description
Pathname operator; defines the path to the current movie’s folder and is valid on both Windows and Macintosh computers.
Chapter 354
Identify the current movie’s folder by using the @ symbol followed by one of these pathname separators:
/ (forward slash)
\ (backslash)
• : (colon)
When a movie is queried to determine its location, the string returned will include the @ symbol. Be sure to use only the @ symbol when navigating between Director movies or changing the
source of a linked media cast member. The @ symbol does not work when the FileIO Xtra or other functions are used outside those available within Director.
You can build on this pathname to specify folders that are one or more levels above or below the current movie’s folder. Keep in mind that the @ portion represents the current movie’s location, not necessarily the location of the projector.
Add an additional pathname separator immediately after the @ symbol to specify a folder one
level up in the hierarchy.
Add folder names and filenames (separated by /, \, or :) after the current folder name to
specify subfolders and files within folders.
You can use relative pathnames in Lingo to indicate the location of a linked file in a folder different than the movie’s folder.
Examples
These are equivalent expressions that specify the subfolder bigFolder, which is in the current movie’s folder:
@/bigFolder @:bigFolder @\bigFolder
These are equivalent expressions that specify the file linkedFile, in the subfolder bigFolder, which is in the current movie’s folder:
@:bigFolder:linkedFile @\bigFolder\linkedFile @/bigFolder/linkedFile
Examples
This expression specifies the file linkedFile, which is located one level up from the current movie’s folder:
@//linkedFile
This expression specifies the file linkedFile, which is located two levels up from the current movie’s folder:
@:::linkedFile
These are equivalent expressions that specify the file linkedFile, which is in the folder otherFolder. The otherFolder folder is in the folder one level up from the current movie’s folder.
@::otherFolder:linkedFile @\\otherFolder\linkedFile @//otherFolder/linkedFile
See also
searchPath, fileName (cast property), fileName (cast member property), fileName (window property)
Lingo Dictionary 55
abbr, abbrev, abbreviated
These elements are used by the date and time functions.
See also
date() (system clock)
abort
Syntax
abort
Description
Command; tells Lingo to exit the current handler and any handler that called it without executing any of the remaining statements in the handler. This differs from the which returns to the handler from which the current handler was called.
abort command does not quit Director.
The
Example
This statement instructs Lingo to exit the handler and any handler that called it when the amount of free memory is less than 50K:
if the freeBytes < 50*1024 then abort
See also
exit, halt, quit
exit keyword,
abs()
Syntax
abs (numericExpression)
Description
Math function; calculates the absolute value of a numerical expression. If numericExpression is an integer, its absolute value is also an integer. If its absolute value is also a floating-point number.
abs function has several uses. It can simplify the tracking of mouse and sprite movement by
The converting coordinate differences (which can be either positive or negative numbers) into distances (which are always positive numbers). The mathematical functions, such as
Example
sqrt and log.
This statement determines whether the absolute value of the difference between the current mouse position and the value of the variable to use a negative number for distance). If it is, the foreground color of sprite 6 is changed.
if (the mouseV - startV).abs > 30 then sprite(6).forecolor = 95
numericExpression is a floating-point number,
abs function is also useful for handling
startV is greater than 30 (since you wouldn’t want
Chapter 356
actionsEnabled
Syntax
the actionsEnabled of sprite whichFlashSprite the actionsEnabled of member whichFlashMember sprite whichFlashSprite.actionenabled member whichFlashMember.actionenabled
Description
Cast member property and sprite property; controls whether the actions in a Flash movie are enabled (TRUE, default) or disabled (FALSE).
This property can be tested and set.
Example
This handler accepts a sprite reference as a parameter, and then toggles the sprite’s
actionsEnabled property on or off.
Dot syntax:
on ToggleActions whichSprite
sprite (whichSprite).actionsEnabled = not sprite (whichSprite).actionsEnabled
end
Verbo se syntax:
on ToggleActions whichSprite
set the actionsEnabled of sprite whichSprite = not the actionsEnabled of sprite whichSprite
end
activateApplication
Syntax
on activateApplication
Description
Built-in handler; runs when the projector is brought to the foreground. This handler is useful when a projector runs in a window and the user can send it to the background to work with other applications. When the projector is brought back to the foreground, this handler runs. Any MIAWs running in the projector can also make use of this handler.
During authoring, this handler is called only if Animate in Background is turned on in General Preferences.
On Windows, this handler is not called if the projector is merely minimized and no other application is brought to the foreground.
Example
This handler plays a sound each time the user brings the projector back to the foreground:
on activateApplication
sound(1).queue(member("openSound")) sound(1).play()
end
See also
deactivateApplication, activeCastLib, on deactivateWindow
Lingo Dictionary 57
on activateWindow
Syntax
on activateWindow
statement(s)
end
Description
System message and event handler; contains statements that run in a movie when the user clicks the inactive window and the window comes to the foreground.
You can use an
on activateWindow handler in a script that you want executed every time the
movie becomes active. Clicking the main movie (the main Stage) does not generate an
Example
on activateWindow handler.
This handler plays the sound Hurray when the window that the movie is playing in becomes active:
on activateWindow
puppetSound 2, "Hurray"
end
See also
activeWindow, close window, on deactivateWindow, frontWindow, on moveWindow, open
active3dRenderer
Syntax
the active3dRenderer
Description
3D Lingo movie property; indicates the renderer currently in use by the movie for drawing 3D sprites. This property is equivalent to the
The possible values of the
#directX5_2, and #software. The values #openGL, #directX7_0, and #directX5_2, which are
active3DRenderer property are #openGL, #directX7_0,
video card drivers, will lead to much faster performance than #software, a software renderer used when none of the first three options are available.
getRendererServices().renderer property.
active3dRenderer property can be tested, but not set. Use
The
getRendererServices().renderer to set this property.
Examples
These examples show the two ways to determine which renderer is currently in use.
put the active3dRenderer
-- #openGL put getRendererServices().renderer
-- #openGL
See also
renderer, rendererDeviceList, getRendererServices()
Chapter 358
activeCastLib
Syntax
the activeCastLib
Description
System property; indicates which cast was most recently activated. The activeCastLib property’s value is the cast’s number.
activeCastLib property is useful when working with the selection castLib property.
The Use it to determine which cast the selection refers to.
This property can be tested but not set.
Example
These statements assign the selected cast members in the most recently selected cast to the variable
castLibOfInterest = the activeCastLib selectedMembers = castLib(castLibOfInterest).selection
selectedMembers:
An equivalent way to write this is:
selectedMembers = castLib(the activeCastLib).selection
activeWindow
Syntax
the activeWindow
Description
Movie property; indicates which movie window is currently active. For the main movie,
activeWindow is the Stage. For a movie in a window, activeWindow is the movie in the window.
Example
This example places the word Active in the title bar of the clicked window and places the word Inactive in the title bar of all other open windows:
on activateWindow set clickedWindow = (the windowlist).getPos(the activeWindow)
set windowCount = (the windowlist).count
repeat with x = 1 to windowCount
if x = clickedWindow then (the activeWindow).title = "Active" else (the windowlist[x]).title = "Inactive" end if
end repeat
end
See also
activeCastLib, windowList
actorList
Syntax
the actorList
Lingo Dictionary 59
Description
Movie property; a list of child objects that have been explicitly added to this list. Objects in
actorList receive a stepFrame message each time the playhead enters a frame.
To add an object to the actorList, use add actorList, theObject. The object’s on stepFrame handler in its parent or ancestor script will then be called automatically at each frame advance.
To clear objects from Director doesn’t clear the contents of
the actorList, set actorList to [ ], which is an empty list.
actorList when branching to another movie, which can
cause unpredictable behavior in the new movie. To prevent child objects in the current movie from being carried over to the new movie, insert the statement
on prepareMovie handler of the new movie.
Unlike previous versions of Director,
Examples
actorList is now supported in the Director player for Java.
set the actorList = [ ] in the
This statement adds a child object created from the parent script Moving Ball. All three values are parameters that the script requires.
add the actorList, new(script "MovingBall", 1, 200,200)
This statement displays the contents of actorList in the Message window:
put the actorList
This statement clears objects from actorList.
the actorList = [ ]
See also
new()
add
Syntax
linearList.add(value) add linearList, value
Description
List command; for linear lists only, adds the value specified by value to the linear list specified by
linearList. For a sorted list, the value is placed in its proper order. For an unsorted list, the
value is added to the end of the list. This command returns an error when used on a property list.
Note: Don’t confuse the add command with the + operator used for addition or the & operator used to concatenate strings.
Examples
These statements add the value 2 to the list named bids. The resulting list is [3, 4, 1, 2].
bids = [3, 4, 1] bids.add(2)
This statement adds 2 to the sorted linear list [1, 4, 5]. The new item remains in alphanumeric order because the list is sorted.
bids.add(2)
See also
sort
Chapter 360
add (3D texture)
Syntax
member(whichCastmember).model(whichModel).meshdeform.mesh[index].\
textureLayer.add()
Description
3D meshdeform modifier command; adds an empty texture layer to the model’s mesh. You can copy texture coordinates between layers using the following code:
modelReference.meshdeform.texturelayer[a].texturecoordinatelist =
modelReference.meshdeform.texturelayer[b].texturecoordinatelist
Example
This statement creates a new texture layer for the first mesh of the model named Ear.
member("Scene").model("Ear").meshdeform.mesh[1].\
textureLayer.add()
See also
meshDeform (modifier), textureLayer, textureCoordinateList
addAt
Syntax
list.AddAt(position, value) addAt list, position, value
Description
List command; for linear lists only, adds a value specified by value to a list at the position specified by
position.
This command returns an error when used with a property list.
Example
This statement adds the value 8 to the fourth position in the list named bids, which is [3,2,4,5,6, 7]:
bids = [3, 2, 4, 5, 6, 7] bids.addAt(4,8)
The resulting value of bids is [3, 2, 4, 8, 5, 6, 7].
addBackdrop
Syntax
sprite(whichSprite).camera{(index)}.addBackdrop(texture, locWithinSprite,
rotation)
member(whichCastmember).camera(whichCamera).addBackdrop(texture,
locWithinSprite, rotation)
Description
3D camera command; adds a backdrop to the end of the camera’s list of backdrops. The backdrop is displayed in the 3D sprite at
locWithinSprite parameter is a 2D loc measured from the upper left corner of the sprite.
locWithinSprite with the indicated rotation. The
Lingo Dictionary 61
Examples
The first line of this statement creates a texture named Rough from the cast member named Cedar and stores it in the variable t1. The second line applies the texture as a backdrop at the point (220, 220) within sprite 5. The texture has a rotation of 0 degrees. The last line applies the same texture as a backdrop for camera 1 of the cast member named Scene at the point (20, 20) with a rotation of 45 degrees.
t1 = member("Scene").newTexture("Rough", #fromCastMember, \
member("Cedar")) sprite(5).camera.addBackdrop(t1, point(220, 220), 0) member("Scene").camera[1].addBackdrop(t1, point(20, 20), 45)
See also
removeBackdrop
addCamera
Syntax
sprite(whichSprite).addCamera(whichCamera, index)
Description
3D command; adds the camera whichCamera, at the given index position, to the list of cameras for the sprite. If index is greater than the value of cameraCount(), the camera is added to the end of the list. The view from each camera is displayed on top of the view from cameras with lower
index positions. You can set the rect property of each camera to display multiple views
within the sprite.
Example
This statement inserts the camera named FlightCam at the fifth index position of the list of cameras of sprite 12:
sprite(12).addCamera(member("scene").camera("FlightCam"), 5)
See also
cameraCount(), deleteCamera
addChild
Syntax
member(whichCastmember).node(whichParentNode).addChild(member\
(whichCastmember).node(whichChildNode) {,#preserveWorld})
Description
3D command; adds the node whichChildNode to the list of children of the node
whichParentNode, and removes it from the list of children of its former parent. Either node
argument can be a model, group, camera, or light. An equivalent operation would be to set the
parent property of whichChildNode to whichParentNode.
The optional
#preserveParent. When the child is added with #preserveParent specified, the parent-relative
transform of the child remains unchanged and the child jumps to that transform in the space of its new parent. The child’s world transform is recalculated. When the child is added with
#preserveWorld specified, the world transform of the child remains unchanged and the child does
not jump to its transform in the space of its new parent. Its parent-relative transform is recalculated.
#preserveWorld parameter has two possible values: #preserveWorld or
Chapter 362
Examples
This statement adds the model named Tire to the list of children of the model named Car.
member("3D").model("Car").addChild(member("3D").model("Tire"))
This statement adds the model named Bird to the list of children of the camera named MyCamera and uses the
member("3D").camera("MyCamera").addChild(member("3D").model ("Bird"), #preserveWorld)
See also
parent, addToWorld, removeFromWorld
#preserveWorld argument to maintain Bird’s world position.
addModifier
Syntax
member(whichCastmember).model(whichModel).addModifier\
(#modifierType)
Description
3D model command; adds the specified modifier to the model. Possible modifiers are as follows:
#bonesPlayer
#collision
#inker
#keyframePlayer
#lod (level of detail)
#meshDeform
#sds
#toon
There is no default value for this command. For more detailed information about each modifier, see the individual modifier entries.
Example
This statement adds the toon modifier to the model named Box.
member("shapes").model("Box").addModifier(#toon)
See also
bonesPlayer (modifier), collision (modifier), inker (modifier), keyframePlayer (modifier) getRendererServices(), removeModifier, modifier, modifier[], modifiers
, lod (modifier), meshDeform (modifier), sds (modifier), toon (modifier),
Lingo Dictionary 63
addOverlay
Syntax
sprite(whichSprite).camera{(index)}.addOverlay(texture, \
locWithinSprite, rotation) member(whichCastmember).camera(whichCamera).addOverlay(texture, \
locWithinSprite, rotation)
Description
3D camera command; adds an overlay to the end of the camera’s list of overlays. The overlay is displayed in the 3D sprite at
locWithinSprite parameter is a 2D loc measured from the upper left corner of the sprite.
Examples
The first line of this statement creates a texture named Rough from the cast member named Cedar and stores it in the variable t1. The second line applies the texture as an overlay at the point (220, 220) within sprite 5. The texture has a rotation of 0 degrees. The last line of the statement applies the same texture as an overlay for camera 1 of the cast member named Scene at the point (20, 20). The texture has a rotation of 45 degrees.
t1 = member("Scene").newTexture("Rough", #fromCastMember,\
member("Cedar")) sprite(5).camera.addOverlay(t1, point(220, 220), 0) member("Scene").camera[1].addOverlay(t1, point(20, 20), 45)
See also
removeOverlay
locWithinSprite with the indicated rotation. The
addProp
Syntax
list.addProp(property, value) addProp list, property, value
Description
Property list command; for property lists only, adds the property specified by property and its value specified by value to the property list specified by list. For an unsorted list, the value is added to the end of the list. For a sorted list, the value is placed in its proper order.
If the property already exists in the list, Lingo creates a duplicate property. You can avoid duplicate properties by using the
This command returns an error when used with a linear list.
Examples
This statement adds the property named kayne and its assigned value 3 to the property list named
bids, which contains [#gee: 4, #ohasi: 1]. Because the list is sorted, the new entry is
placed in alphabetical order:
bids.addProp(#kayne, 3)
The result is the list [#gee: 4, #kayne: 3, #ohasi: 1]. This statement adds the entry
#kayne: 3, #ohasi: 1]. Because the list already contains the property duplicate property:
setaProp command to change the new entry’s property.
kayne: 7 to the list named bids, which now contains [#gee: 4,
kayne, Lingo creates a
bids.addProp(#kayne, 7)
The result is the list [#gee: 4, #kayne: 3, #kayne: 7, #ohasi: 1].
Chapter 364
addToWorld
Syntax
member(whichCastmember).model(whichModel).addToWorld() member(whichCastmember).group(whichGroup).addToWorld() member(whichCastmember).camera(whichCamera).addToWorld() member(whichCastmember).light(whichLight).addToWorld()
Description
3D command; inserts the model, group, camera, or light into the 3D world of the cast member as a child of the group named World.
When a model, group, camera, or light is created or cloned, it is automatically added to the world. Use the 3D world without deleting it. Use the camera, or light has been added or removed from the world.
Example
This statement adds the model named gbCyl to the 3D world of the cast member named Scene.
member("Scene").model("gbCyl").addToWorld()
See also
isInWorld(), removeFromWorld
removeFromWorld command to take a model, group, camera, or light out of the
isInWorld() command to test whether a model, group,
addVertex
Syntax
member(memberRef).AddVertex(indexToAddAt, pointToAddVertex \ {,[ controlLocH, controlLocV ], [ controlLocH, controlLocV ]}) addVertex(member memberRef, indexToAddAt, pointToAddVertex \ {,[controlLocH, controlLocV], [controlLocH,controlLocV]})
Description
Vector shape command; adds a new vertex to a vector shape cast member in the position specified. The horizontal and vertical positions are relative to the origin of the vertex shape cast member. When using the final two optional parameters, you can specify the location of the control handles
for the vertex. The control handle location is offset relative to the vertex, so if no location is specified, it will be located at 0 horizontal offset and 0 vertical offset.
Example
This line adds a vertex point in the vector shape Archie between the two existing vertex points, at the position 25 horizontal and 15 vertical:
member("Archie").addVertex(2, point(25, 15))
See also
vertexList, moveVertex(), deleteVertex(), originMode
after
See
put...after
Lingo Dictionary 65
alert
Syntax
alert message
Description
Command; causes a system beep and displays an alert dialog box containing the string specified by message and an OK button. This command is useful for providing error messages of up to 255 characters in your movie.
The message must be a string. If you want to include a number variable in an alert, use the
string function to convert the variable to a string.
Examples
The following statement produces an alert stating that there is no CD-ROM drive connected:
alert "There is no CD-ROM drive connected."
This statement produces an alert stating that a file was not found:
alert "The file" && QUOTE & filename & QUOTE && "was not found."
See also
string(), alertHook
alertHook
Syntax
the alertHook
Description
System property; specifies a parent script that contains the on alertHook handler. Use
alertHook to control the display of alerts about file errors or Lingo script errors. When an error
occurs and a parent script is assigned to
alertHook, Director runs the on alertHook handler in
the parent script. Although it is possible to place
on alertHook handlers in movie scripts, it is strongly
recommended that you place an on alertHook handler in a behavior or parent script to avoid unintentionally calling the handler from a wide variety of locations and creating confusion about where the error occurred.
Because the handler for Lingo that isn’t involved in handling an error. For example, the handler is a bad location for a
on alertHook handler is passed an instance argument, two string arguments that describe
The
on alertHook handler runs when an error occurs, avoid using the on alertHook
on alertHook
go to movie statement.
the error, and an optional argument specifying an additional event that invokes the handler.
Chapter 366
The fourth argument can have 1 of these 4 values:
#alert - causes the handler to be triggered by the alert command.
#movie - causes the handler to be triggered by a file not found error while perforoming a go to
movie
command.
#script - causes the handler to be triggered by a script error.
#safeplayer - causes the handler to be triggered by a check of the safePlayer property.
Depending on the Lingo within it, the
on alertHook handler can ignore the error or report it in
another way.
Example
The following statement specifies that the parent script Alert is the script that determines whether to display alerts when an error occurs. If an error occurs, Lingo assigns the error and message strings to the field cast member Output and returns the value 1.
on prepareMovie
the alertHook = script "Alert" end
-- parent script "Alert" on alertHook me, err, msg
member("Output").text = err && msg
return 1 end
See also
safePlayer
alignment
Syntax
member(whichCastMember).alignment the alignment of member whichCastMember
Description
Cast member property; determines the alignment used to display characters within the specified cast member. This property appears only to field and text cast members containing characters, if only a space.
For field cast members, the value of the property is a string consisting of one of the following: left, center, or right.
For text cast members, the value of the property is a symbol consisting of one of the following: #left, #center, #right, or #full.
The parameter
whichCastMember can be either a cast name or a cast number.
This property can be tested and set. For text cast members, the property can be set on a per­paragraph basis.
Examples
This statement sets the variable named characterAlign to the current alignment setting for the field cast member Rokujo Speaks:
Lingo Dictionary 67
Dot syntax:
characterAlign = member("Rokujo Speaks").alignment
Verbo se syntax:
set characterAlign = the alignment of member "Rokujo Speaks"
This repeat loop consecutively sets the alignment of the field cast member Rove to left, center, and then right.
Dot syntax:
repeat with i = 1 to 3
member("Rove").alignment = ("left center right").word[i] end repeat
Verbo se syntax:
repeat with i = 1 to 3
set the alignment of member "Rove" to word i of "left center right" end repeat
See also
text, font, lineHeight (cast member property), fontSize, fontStyle, & (concatenator)
, && (concatenator)
allowCustomCaching
Syntax
the allowCustomCaching
Description
Movie property; will contain information regarding a private cache in future versions of Director. This property defaults to
See also
allowGraphicMenu, allowSaveLocal, allowTransportControl, allowVolumeControl, allowZooming
TRUE, and can be tested and set.
allowGraphicMenu
Syntax
the allowGraphicMenu
Description
Movie property; sets the availability of the graphic controls in the context menu when playing the movie in a Shockwave environment.
Set this property to context menu.
This property defaults to
FALSE if you would rather have a text menu displayed than the graphic
TRUE, and can be tested and set.
Example
the allowGraphicMenu = 0
See also
allowSaveLocal, allowTransportControl, allowVolumeControl, allowZooming
Chapter 368
allowSaveLocal
Syntax
the allowSaveLocal
Description
Movie property; sets the availability of the Save control in the context menu when playing the movie in a Shockwave environment.
This property is provided to allow for enhancements in future versions of Shockwave. This property defaults to
See also
allowGraphicMenu, allowTransportControl, allowVolumeControl, allowZooming
TRUE, and can be tested and set.
allowTransportControl
Syntax
the allowTransportControl
Description
Movie property; This property is provided to allow for enhancements in future versions of Shockwave.
This property defaults to
See also
allowGraphicMenu, allowSaveLocal, allowVolumeControl, allowZooming
TRUE, and can be tested and set.
allowVolumeControl
Syntax
the allowVolumeControl
Description
Movie property; sets the availability of the volume control in the context menu when playing the movie in a Shockwave environment.
When set to set to
FALSE.
This property defaults to
See also
allowGraphicMenu, allowSaveLocal, allowTransportControl, allowZooming
TRUE one or the other volume control is active, and is disabled when the property is
TRUE, and can be tested and set.
Lingo Dictionary 69
allowZooming
Syntax
the allowZooming
Description
Movie property; determines whether the movie may be stretched or zoomed by the user when playing back in Shockwave and ShockMachine. Defaults to TRUE. This property can be tested and set. Set this property to
FALSE to prevent users from changing the size of the movie in browsers
and ShockMachine.
See also
allowGraphicMenu, allowSaveLocal, allowTransportControl, allowVolumeControl
alphaThreshold
Syntax
member(whichMember).alphaThreshold the alphaThreshold of member whichMember
Description
Bitmap cast member property; governs how the bitmap’s alpha channel affects hit detection. This property is a value from 0 to 255, that exactly matches alpha values in the alpha channel for a 32­bit bitmap image.
For a given map at that point is equal to or greater than the threshold. Setting the
alphaThreshold setting, Director detects a mouse click if the pixel value of the alpha
alphaThreshold to 0
makes all pixels opaque to hit detection regardless of the contents of the alpha channel.
See also
useAlpha
ambient
Syntax
member(whichCastmember).shader(whichShader).ambient member(whichCastmember).model(whichModel).shader.ambient member(whichCastmember).model(whichModel).shaderList{[index]}.\
ambient
Description
3D #standard shader property; indicates how much of each color component of the ambient light in the cast member is reflected by the shader.
For example, if the color of the ambient light is
ambient property of the shader is rgb(255, 0, 0), the shader will reflect all of the red
component of the light that the shader’s colors can reflect. However, it will reflect none of the blue and green components of the light, regardless of the colors of the shader. In this case, if there are no other lights in the scene, the blue and green colors of the shader will reflect no light, and will appear black.
rgb(255, 255, 255) and the value of the
The default value of this property is
Chapter 370
rgb(63,63,63).
Example
This statement sets the ambient property of the model named Chair to rgb(255, 255, 0). Chair will fully reflect the red and green components of the ambient light in the scene and completely ignore its blue component.
member("Room").model("Chair").shader.ambient = rgb(255, 0, 0)
See also
ambientColor, newLight, type (light), diffuse, specular (shader)
ambientColor
Syntax
member(whichCastmember).ambientColor
Description
3D cast member property; indicates the RGB color of the default ambient light of the cast member.
The default value for this property is rgb(0, 0, 0). This adds no light to the scene.
Example
This statement sets the ambientColor property of the cast member named Room to rgb(255, 0,
0). The default ambient light of the cast member will be red. This property can also be set in the Property inspector.
member("Room").ambientColor = rgb(255, 0, 0)
See also
directionalColor, directionalPreset, ambient
ancestor
Syntax
property {optionalProperties} ancestor
Description
Object property; allows child objects and behaviors to use handlers that are not contained within the parent script or behavior.
The
ancestor property is typically used with two or more parent scripts. You can use this
property when you want child objects and behaviors to share certain behaviors that are inherited from an ancestor, while differing in other behaviors that are inherited from the parents.
For child objects, the parent script. Sending a message to a child object that does not have a defined handler forwards that message to the script defined by the
If a behavior has an ancestor, the ancestor receives mouse events such as
mouseWithin.
ancestor property is usually assigned in the on new handler within the
ancestor property.
mouseDown and
ancestor property lets you change behaviors and properties for a large group of objects with
The a single command.
Lingo Dictionary 71
The ancestor script can contain independent property variables that can be obtained by child objects. To refer to property variables within the ancestor script, you must use this syntax:
me.propertyVariable = value
For example, this statement changes the property variable legCount within an ancestor script to 4:
me.legCount = 4
Use the syntax the variableName of scriptName to access property variables that are not contained within the current object. This statement allows the variable child object to access the property variable
set myLegCount to the legCount of me
Example
legCount within the ancestor script:
myLegCount within the
Each of the following scripts is a cast member. The ancestor script Animal and the parent scripts Dog and Man interact with one another to define objects.
The first script, Dog, sets the property variable Animal script, and sets the
property breed, ancestor on new me
set breed = "Mutt"
set the ancestor of me to new(script "Animal")
set the legCount of me to 4
return me end
legCount variable that is stored in the ancestor script to 4:
breed to Mutt, sets the ancestor of Dog to the
The second script, Man, sets the property variable race to Caucasian, sets the ancestor of Man to the Animal script, and sets the
property race, ancestor on new me
set race to "Caucasian"
set the ancestor of me to new(script "Animal")
set the legCount of me to 2
return me end
See also
new(), me, property
legCount variable that is stored in the ancestor script to 2:
and
Syntax
logicalExpression1 and logicalExpression2
Description
Logical operator; determines whether both logicalExpression1 and logicalExpression2 are
TRUE (1), or whether either or both expressions are FALSE (0).
The precedence level of this logical operator is 4.
Examples
This statement determines whether both logical expressions are TRUE and displays the result in the Message window:
put 1 < 2 and 2 < 3
Chapter 372
The result is 1, which is the numerical equivalent of TRUE. The first logical expression in the following statement is
FALSE. Because both logical expressions are not TRUE, the logical operator displays the result 0,
which is the numerical equivalent of
put 1 < 2 and 2 < 1
-- 0
See also
not, or
FALSE.
TRUE; and the second logical expression is
angle
Syntax
member(whichCastmember).modelResource(whichModelResource).\
emitter.angle
Description
3D emitter property; describes the area into which the particles of a particle system are emitted. A particle system is a model resource whose type is
The primary direction of particle emission is the vector set by the emitter’s direction property. However, the direction of emission of a given particle will deviate from that vector by a random angle between 0 and the value of the emitter’s
The effective range of this property is 0.0 to 180.0. The default value is 180.0.
#particle.
angle property.
Example
This statement sets the angle of emission of the model resource named mrFount to 1, which causes the emitted particles to form a thin line.
member("fountain").modelResource("mrFount").emitter.angle = 1
See also
emitter, direction
angleBetween
Syntax
vector1.angleBetween(vector2)
Description
3D vector method; returns the angle between two vectors, in degrees.
Example
In this example, pos1 is a vector on the X axis and pos2 is a vector on the Y axis. The angle between these two vectors is 90°. The value returned by
pos1 = vector(100, 0, 0) pos2 = vector(0, 100, 0) put pos1.angleBetween(pos2)
-- 90.0000
pos1.angleBetween(pos2) is 90.0000.
See also
dot(), dotProduct()
Lingo Dictionary 73
animationEnabled
Syntax
member(whichCastmember).animationEnabled
Description
3D cast member property; indicates whether motions will be executed (TRUE) or ignored (FALSE). This property can also be set in the Property inspector.
The default value for this property is
Example
TRUE.
This statement disables animation for the cast member named Scene.
member("Scene").animationEnabled = FALSE
antiAlias
Syntax
member(whichMember).antiAlias sprite(whichVectorSprite).antiAlias
Description
Cast member property; controls whether a text, Vector shape, or Flash cast member is rendered using anti-aliasing to produce high-quality rendering, but possibly slower playback of the movie.
antiAlias property is TRUE by default.
The For vector shapes,
is the equivalent of
antiAlias property may also be used as a sprite property only for Vector shape sprites.
The This property can be tested and set.
Example
This behavior checks the color depth of the computer on which the movie is playing. If the color depth is set to 8 bits or less (256 colors), the script sets the
TRUE is the equivalent of the #high quality setting for a Flash asset, and FALSE
#low.
antiAlias property of the sprite to FALSE.
property spriteNum on beginsprite me
if the colorDepth <= 8 then
sprite(spriteNum).antiAlias = FALSE
end if end
See also
antiAliasThreshold, quality
antiAliasingEnabled
Syntax
sprite(whichSprite).antiAliasingEnabled
Type
3D sprite property.
Chapter 374
Description
This property indicates whether the 3D world in the sprite whichSprite is anti-aliased. It can be tested and set. The default value is
antiAliasingEnabled property is set to TRUE and the 3D renderer changes to a renderer that
does not support anti-aliasing, the property is set to
FALSE, indicating that anti-aliasing is off. If the
FALSE. The value of this property is not saved
when the movie is saved. Anti-aliased sprites use more processor power and memory than sprites that are not anti-aliased.
Temporarily turning off anti-aliasing can improve the performance of animations and user interaction.
Example
This Lingo checks whether the currently running 3D renderer for sprite 2 supports anti-aliasing with the turns on anti-aliasing for the sprite with the
if sprite(2).antiAliasingSupported = TRUE then
end if
See Also
antiAliasingSupported, renderer, rendererDeviceList
antiAliasingSupported property. If anti-aliasing is supported, the second statement
antiAliasingEnabled property.
sprite(2).antiAliasingEnabled = TRUE
antiAliasingSupported
Syntax
sprite(whichSprite).antiAliasingSupported
Type
3D sprite property.
Description
This property indicates whether anti-aliasing is supported by the current 3D renderer. This property can be tested but not set. This property returns either
Example
TRUE or FALSE.
This Lingo checks whether the currently running 3D renderer for sprite 3 supports anti-aliasing. If anti-aliasing is supported, the second statement turns on anti-aliasing for the sprite with the
antiAliasingEnabled property. if sprite(3).antiAliasingSupported = TRUE then
sprite(3).antiAliasingEnabled = TRUE end if
See Also
antiAliasingEnabled, renderer, rendererDeviceList
Lingo Dictionary 75
antiAliasThreshold
Syntax
member(whichTextMember).antiAliasThreshold
Description
Text cast member property; this setting controls the point size at which automatic anti-aliasing takes place in a text cast member. This has an effect only when the antiAlias property of the text cast member is set to
TRUE.
The setting itself is an integer indicating the font point size at which the anti-alias takes place. This property defaults to 14 points.
See also
antiAlias
append
Syntax
list.append(value) append list, value
Description
List command; for linear lists only, adds the specified value to the end of a linear list. This differs from the
add command, which adds a value to a sorted list according to the list’s order.
This command returns a script error when used with a property list.
Example
This statement adds the value 2 at the end of the sorted list named bids, which contains [1, 3, 4], even though this placement does not match the list’s sorted order:
set bids = [1, 3, 4] bids.append(2)
The resulting value of bids is [1, 3, 4, 2].
See also
add (3D texture), sort
applicationPath
Syntax
the applicationPath
Description
System property; determines the path or location of the folder containing the running copy of the Director application during authoring, or the folder containing the projector during run time. The property value is a string.
If you use expression in parentheses so that Lingo parses the expression as one phrase.
the applicationPath followed by & and a path to a subfolder, enclose the entire
The Director player for Java doesn’t support this property, nor does Shockwave. This property can be tested but not set.
Chapter 376
Examples
This statement displays the pathname for the folder that contains the Director application.
put the applicationPath
--"Z:\Program Files\Macromedia\Director"
This statement opens the movie Sunset Boulevard in a window (on a Windows machine):
open window (the applicationPath & "\Film Noir\Sunset Boulevard")
See also
@ (pathname), moviePath
appMinimize
Syntax
appMinimize
Description
Command; on Windows, appMinimize causes a projector to minimize to the Windows Task Bar. On the Macintosh, may be re-opened from the Macintosh application menu.
This is useful for projectors and MIAWs that play back without a title bar.
See also
windowType
appMinimize causes a projector to be hidden. Once hidden, the projector
atan()
Syntax
(number).atan atan (number)
Description
Math function; calculates the arctangent, which is the angle whose tangent is a specified number. The result is a value in radians between pi/2 and +pi/2.
Examples
This statement displays the arctangent of 1:
(1).atan
The result, to four decimal places, is 0.7854, or approximately pi/4. Note that most trigonometric functions use radians, so you may want to convert from degrees
to radians. This handler lets you convert between degrees and radians:
on DegreesToRads degreeValue
return degreeValue * PI/180 end
The handler displays the conversion of 30 degrees to radians in the Message window:
put DegreesToRads(30)
-- 0.5236
See also
cos(), PI, sin()
Lingo Dictionary 77
attenuation
Syntax
member(whichCastMember).light(whichLight).attenuation
Description
3D light property; indicates the constant, linear, and quadratic attenuation factors for spotlights and point lights.
The default value for this property is vector(1.0, 0.0, 0.0).
Example
This statement sets the attenuation property of the light named HouseLight to the vector (.5, 0,
0), darkening it slightly.
member("3d world").light("HouseLight").attenuation = \
vector(.5, 0, 0)
See also
color (light)
attributeName
Syntax
XMLnode.attributeName[ attributeNumber ]
Description
XML property; returns the name of the specified child node of a parsed XML document. Example Beginning with the following XML:
<?xml version="1.0"?>
<e1>
<tagName attr1="val1" attr2="val2"/> <e2>element 2</e2> <e3>element 3</e3> here is some text
</e1>
This Lingo returns the name of the first attribute of the tag called tagName:
put gParserObject.child[1].child[1].attributeName[1]
-- "attr1"
See also
attributeValue
Chapter 378
attributeValue
Syntax
XMLnode.attributeValue[ attributeNameOrNumber ]
Description
XML property; returns the value of the specified child node of a parsed XML document.
Example
Beginning with the following XML:
<?xml version="1.0"?>
<e1>
<tagName attr1="val1" attr2="val2"/> <e2>element 2</e2> <e3>element 3</e3> here is some text
</e1>
This Lingo returns the value of the first attribute of the tag called tagName:
put gParserObject.child[1].child[1].attributeValue[1]
-- "val1"
See also
attributeName
audio (RealMedia)
Syntax
sprite(whichSprite).audio member(whichCastmember).audio
Description
RealMedia sprite or cast member property; allows you to play (TRUE) or mute (FALSE) the audio in the RealMedia stream. The default setting for this property is than 1 or 0 are treated as TRUE (1). Setting this property has no effect if the
realPlayerNativeAudio() function is set to TRUE.
If the audio property is set to FALSE when a RealMedia cast member starts playing, a sound channel is still allocated, which allows you to toggle the sound on and off during playback.
There may be some latency involved in setting this property, which means there may be a slight delay before the sound toggles on or off.
Examples
The following examples show that the audio properties for sprite 2 and the cast member Real is set to
TRUE, which means that the audio portion of the RealMedia stream will be played.
put sprite(2).audio
-- 1 put member("Real").audio
-- 1
TRUE (1). Integer values other
Lingo Dictionary 79
The following Lingo sets the audio property for sprite 2 and the cast member Real to FALSE, which means that the audio portion of the RealMedia stream will not be played when the movie is played.
sprite(2).audio = FALSE member("Real").audio = FALSE
See also
soundChannel (RealMedia), video (RealMedia), sound
auto
Syntax
member(whichCastmember).model(whichModel).lod.auto
Description
3D lod modifier property; allows the modifier to manage the reduction of detail in the model as the distance between the model and the camera changes.
The setting of the modifier’s detail from the model when the
bias property determines how aggressively the modifier removes
auto property is set to TRUE.
The modifier updates its level property as it adjusts the model’s level of detail. Setting the level property has no effect unless the
#lod modifier can only be added to models created outside of Director in 3D modeling
The programs. The value of the
#fromFile. The modifier cannot be added to primitives created within Director.
Example
auto property is set to FALSE.
type property of the model resources used by these models is
This statement sets the auto property of the lod modifier of the model named Spaceship to TRUE. The modifier will automatically set the model’s level of detail.
member("3D World").model("Spaceship").lod.auto = TRUE
See also
lod (modifier), bias, level
autoblend
Syntax
member(whichCastmember).model(whichModel).\
keyframePlayer.autoblend member(whichCastmember).model(whichModel).bonesPlayer.autoblend
Description
3D keyframePlayer and bonesPlayer modifier property; indicates whether the modifier creates a linear transition to the currently playing motion from the motion that preceded it
(FALSE). If autoBlend is TRUE, the length of the transition is set by the blendTime property
not of the modifier. If of the modifier and
autoBlend is FALSE, the transition is controlled by the blendFactor property
blendTime is ignored.
Motion blending is completely disabled when The default value of this property is
Chapter 380
(TRUE) or
blendTime is set to 0 and autoBlend is set to TRUE.
TRUE.
Example
This statement turns autoblend off for the model named Alien3. The model’s blendFactor setting will be used for blending successive motions in the playlist.
member("newaliens").model("Alien3").keyframePlayer.\
autoblend = FALSE
See also
blendFactor, blendTime
autoCameraPosition
Syntax
member(whichTextCastmember).autoCameraPosition
Description
3D camera property; indicates whether the camera of the 3D text cast member is automatically positioned to show all of the text (TRUE) or not (FALSE). This is useful when changing the text, font, fontsize, and other properties of the cast member.
This property is not valid with other types of 3D cast members.
Example
This statement sets the autoCameraPosition property of the cast member named Headline to
FALSE. When the cast member is displayed in 3D mode, the camera will not be positioned
automatically.
member("Headline").autoCameraPosition = FALSE
See also
displayMode
autoMask
Syntax
member(whichCursorCastMember).autoMask the autoMask of member whichCastMember
Description
Cast member property; specifies whether the white pixels in the animated color cursor cast member
TRUE, default), or opaque (FALSE).
(
Example
In this script, when the custom animated cursor stored in cast member 5 enters the sprite, the automask is turned on so that the background of the sprite will show through the white pixels. When the cursor leaves the sprite, the automask is turned off.
Using dot syntax, the script is written as:
on mouseEnter
end
whichCursorCastMember are transparent, allowing the background to show through
member 5.autoMask = TRUE
on mouseLeave
member 5.autoMask = FALSE end
Lingo Dictionary 81
Using traditional Lingo syntax, the script is written as:
on mouseEnter
set the autoMask of member 5 = TRUE end
on mouseLeave
set the autoMask of member 5 = FALSE end
autoTab
Syntax
member(whichCastMember).autoTab the autoTab of member whichCastMember
Description
Cast member property; determines the effect that pressing the Tab key has on the editable field or text cast member specified by whichCastMember. The property can be made active (TRUE) or inactive (
This property is always TRUE in an applet created with the Save as Java feature of Director.
Example
This statement causes the cast member Comments to automatically advance the insertion point to the next editable field or text sprite after the user presses Tab.
FALSE). Tabbing order depends on sprite number order, not position on the Stage.
Dot syntax:
member ("Comments").autotab = TRUE
Verbo se Lingo synt ax :
set the autoTab of member "Comments" to TRUE
axisAngle
Syntax
member(whichCastmember).model(whichModel).transform.axisAngle member(whichCastmember).camera(whichCamera).transform.axisAngle member(whichCastmember).light(whichLight).transform.axisAngle member(whichCastmember).group(whichGroup).transform.axisAngle transformReference.axisAngle
Description
3D transform property; describes the transform’s rotation as an axis/angle pair.
axisAngle property is a linear list containing a vector (the axis) and a float (the angle).
The The vector is the axis around which the transform is rotated. The float is the amount, in degrees, of rotation.
The default value of this property is
Examples
This statement shows the rotation of the model named Mailbox as an axisAngle. The model is rotated 145.5 degrees counterclockwise about the y axis.
[vector( 1.0000, 0.0000, 0.0000 ), 0.0000].
put member("Yard").model("Mailbox").transform.axisAngle
-- [vector( 0.0000, 1.0000, 0.0000 ), -145.5000]
See also
rotation (transform)
Chapter 382
back
Syntax
member(whichCastmember).modelResource(whichModelResource).back
Description
3D #box model resource property; indicates whether the side of the box intersected by its +Z axis is sealed (TRUE) or open (FALSE).
The default value for this property is
Example
TRUE.
This statement sets the back property of the model resource named Crate to FALSE, meaning the back of this box will be open.
member("3D World").modelResource("Crate").back = FALSE
See also
bottom (3D), front, top (3D), left (3D), right (3D)
backColor
Syntax
member(whichCastMember).backColor = colorNumber set the backColor of member whichCastMember to colorNumber sprite(whichSprite).backColor the backColor of sprite whichSprite
Description
Cast member and sprite property; sets the background color of the specified cast member or sprite according to the color value assigned.
For cast members: it affects field or button cast member displays.
For sprites: setting the backColor of a sprite is the same as choosing the background color
from the tool palette when the sprite is selected on the Stage. For the value that Lingo sets to
last beyond the current sprite, the sprite must be a puppet. The background color applies only
to 1-bit bitmap and shape cast members. The
backColor value ranges from 0 to 255 for 8-bit color and from 0 to 15 for 4-bit color. The
numbers correspond to the index number of the background color in the current palette. (A color’s index number appears in the color palette’s lower left corner when you click the color.)
You should not apply this property to bitmap cast members deeper than 1-bit, as the results are difficult to predict.
For a movie that plays back as an applet created with the Save as Java feature of Director, specify colors for HTML document.
For example, the hexadecimal value for pure red, FF0000, is equivalent to 16711680 in decimal numbers. This statement specifies pure red as a cast member’s background color:
set the backColor of member = 16711680
This property can be tested and set.
Note: It is recommended that the newer bgColor property be used instead of the backColor property.
backColor using the decimal equivalent of the 24-bit hexadecimal values used in an
Lingo Dictionary 83
Examples
This statement changes the color of the characters in cast member 1 to the color in palette entry 250.
Dot syntax:
member(1).backColor = 250
Verbo se Lingo synt ax :
set the backColor of member 1 to 250
The following statement sets the variable oldColor to the background color of sprite 5:
oldColor = sprite (5).backColor
The following statement randomly changes the background color of a random sprite between sprites 11 and 13 to color number 36:
sprite(10 + random(3)).backColor = 36
See also
bgColor, color (sprite and cast member property)
backdrop
Syntax
sprite(whichSprite).camera{(index)}.backdrop[index].loc member(whichCastmember).camera(whichCamera).backdrop[index].loc sprite(whichSprite).camera{(index)}.backdrop[index].source member(whichCastmember).camera(whichCamera).backdrop[index].source sprite(whichSprite).camera{(index)}.backdrop[index].scale member(whichCastmember).camera(whichCamera).backdrop[index].scale sprite(whichSprite).camera{(index)}.backdrop[index].rotation member(whichCastmember).camera(whichCamera).\
backdrop[index].rotation sprite(whichSprite).camera{(index)}.backdrop[index].regPoint member(whichCastmember).camera(whichCamera).\
backdrop[index].regPoint sprite(whichSprite).camera{(index)}.backdrop[index].blend member(whichCastmember).camera(whichCamera).backdrop[index].blend sprite(whichSprite).camera{(index)}.backdrop.count member(whichCastmember).camera(whichCamera).backdrop.count
Description
3D camera property; a 2D image that is rendered on the camera’s projection plane. All models in the camera’s view appear in front of the backdrop.
Backdrops have the following properties:
Note: These properties can also be used to get, set, and manipulate overlays. See the individual property entries for detailed information.
loc (backdrop and overlay) indicates the 2D location of the backdrop, as measured from the upper
left corner of the sprite.
source indicates the texture used by the backdrop. scale (backdrop and overlay) is the number by which the height and width of the texture are
multiplied to determine the dimensions of the backdrop.
rotation (backdrop and overlay) is the amount by which the backdrop is rotated about its regPoint.
Chapter 384
regPoint (3D) blend (3D) indicates the opacity of the backdrop. count indicates the number of items in the camera’s list of backdrops.
indicates the registration point of the backdrop.
Use the following commands to create and remove backdrops:
addBackdrop creates a backdrop from a texture and adds it to the end of the camera’s list of backdrops. insertBackdrop creates a backdrop from a texture and adds it to the camera’s list of backdrops at a
specific index position.
removeBackdrop deletes the backdrop.
See also
overlay
backgroundColor
Syntax
member(whichVectorMember).backgroundColor the backgroundColor of member whichVectorMember
Description
Vector shape cast member property; sets the background color of the specified cast member or sprite to the RGB color value assigned.
This property can be both tested and set.
Example
member("Archie").backgroundColor= rgb(255,255,255)
See also
bgColor
BACKSPACE
Syntax
BACKSPACE
Description
Constant; represents the Backspace key. This key is labeled Backspace in Windows and Delete on the Macintosh.
Example
This on keyDown handler checks whether the Backspace key was pressed and, if it was, calls the handler
on keyDown
end keyDown
clearEntry:
if the key = BACKSPACE then clearEntry
stopEvent
Lingo Dictionary 85
beep
Syntax
beep {numberOfTimes}
Description
Command; causes the computer’s speaker to beep the number of times specified by
numberOfTimes. If numberOfTimes is missing, the beep occurs once.
In Windows, the beep is the sound assigned in the Sounds Properties dialog box.
For the Macintosh, the beep is the sound selected from Alert Sounds on the Sound control
panel. If the volume on the Sound control panel is set to 0, the menu bar flashes instead.
Example
This statement causes two beeps if the Answer field is empty:
if field "Answer" = EMPTY then beep 2
beepOn
Syntax
the beepOn
Description
Movie property; determines whether the computer automatically beeps when the user clicks on anything except an active sprite (
TRUE), or not (FALSE, default).
Scripts that set
beepOn should be placed in frame or movie scripts.
This property can be tested and set.
Examples
This statement sets beepOn to TRUE:
the beepOn = TRUE
This statement sets beepOn to the opposite of its current setting:
the beepOn = not the beepOn
before
See
put...before
beginRecording
Syntax
beginRecording
Description
Keyword; starts a Score generation session. Only one update session in a movie can be active at a time.
beginRecording keyword must be matched by an endRecording keyword that ends the
Every Score generation session.
Chapter 386
Example
When used in the following handler, the beginRecording keyword begins a Score generation session that animates the cast member Ball by assigning the cast member to sprite channel 20 and then moving the sprite horizontally and vertically over a series of frames. The number of frames is determined by the argument
on animBall numberOfFrames
beginRecording
horizontal = 0 vertical = 100 repeat with i = 1 to numberOfFrames
go to frame i sprite(20).member = member "Ball" sprite(20).locH = horizontal sprite(20).locV = vertical sprite(20).type = 1 sprite(20).foreColor = 255 horizontal = horizontal + 3 vertical = vertical + 2 updateFrame
end repeat
endRecording end
See also
endRecording, updateFrame, scriptNum, tweened
numberOfFrames.
on beginSprite
Syntax
on beginSprite
statement(s)
end
Description
System message and event handler; contains statements that run when the playhead moves to a frame that contains a sprite that was not previously encountered. Like generated only one time, even if the playhead loops on a frame, since the trigger is a sprite not previously encountered by the playhead. The event is generated before
Director creates instances of any behavior scripts attached to the sprite when the beginSprite message is sent.
The object reference
me is passed to this event if it is used in a behavior. The message is sent to
behaviors and frame scripts. If a sprite begins in the first frame that plays in the movie, the
prepareMovie message but before the prepareFrame and startMovie messages.
the
Note: Be aware that some sprite properties, such as the rect sprite property, may not be accessible in a beginSprite handler. This is because the property needs to be calculated, which is not done until the sprite is drawn.
beginSprite message is sent after
The go, play, and updateStage commands are disabled in an on beginSprite handler.
endSprite, this event is
prepareFrame.
Lingo Dictionary 87
Example
This handler plays the sound cast member Stevie Wonder when the sprite begins:
on beginSprite me
puppetSound "Stevie Wonder" end
See also
on endSprite, on prepareFrame, scriptInstanceList
bevelDepth
Syntax
member(whichTextCastmember).bevelDepth member(which3DCastmember).modelResource(whichModelResource).\
bevelDepth
Description
3D text property; indicates the degree of beveling on the 3D text. For text cast members, this property has no effect unless the member’s displayMode property is
#mode3D and its bevelType property is set to #miter or #round.
set to For extruded text in a 3D cast member, this property has no effect unless the model resource’s
bevelType property is set to #miter or #round.
The range of this property is 0.0 to 10.0, and the default setting is 10.0.
Example
In this example, the cast member named Logo is a text cast member. This statement sets the
bevelDepth of logo to 5.5. When logo is displayed in 3D mode, if its bevelType property is set
to
#miter or #round, the edges of its letters will exhibit dramatic beveling.
member("Logo").bevelDepth = 5.5
In this example, the model resource of the model named Slogan is extruded text. This statement sets the
#miter or #round, the edges of its letters will exhibit dramatic beveling. member("scene").model("Slogan").resource.bevelDepth = 5
See also
bevelType, extrude3D, displayMode
bevelDepth of Slogan’s model resource to 5. If the bevelType property of Slogan is set to
bevelType
Syntax
member(whichTextCastmember).bevelType member(which3DCastmember).modelResource(whichModelResource).\
bevelType
Description
3D text property; indicates the style of beveling applied to the 3D text. For text cast members, this is a member property. For extruded text in a 3D cast member, this is a
model resource property.
Chapter 388
The bevelType property has the following possible values:
#none
#miter (the default)
#round
Example
In this example, the cast member named Logo is a text cast member. This statement sets the
bevelType of Logo to #round.
member("logo").beveltype = #round
In this example, the model resource of the model named Slogan is extruded text. This statement sets the
member("scene").model("Slogan").resource.bevelType = #miter
See also
bevelDepth, extrude3D, displayMode
bevelType of Slogan’s model resource to #miter.
bgColor
Syntax
sprite(whichSpriteNumber).bgColor the bgColor of sprite whichSpriteNumber the bgColor of the stage (the stage).bgColor member(which3dMember).bgcolor
Description
Sprite property, system property, and 3D cast member property; determines the background color of the sprite specified by whichSprite, the color of the Stage, or the background color of the 3D cast member. Setting the from the Tools window when the sprite is selected on the Stage. Setting the
bgColor sprite property is equivalent to choosing the background color
bgColor property for
the Stage is equivalent to setting the color in the Movie Properties dialog box. The sprite property has the equivalent functionality of the
backColor sprite property, but the
color value returned is a color object of whatever type has been set for that sprite. This property can be tested and set.
Example
This example sets the color of the Stage to an RGB value. Dot syntax:
(the stage).bgColor = rgb(255, 153, 0)
Verbo se Lingo synt ax :
set the bgColor of the stage = rgb(255, 153, 0)
See also
color(), backColor, backgroundColor, stageColor
Lingo Dictionary 89
bias
Syntax
member(whichCastmember).model(whichModel).lod.bias
Description
3D lod modifier property; indicates how aggressively the modifier removes detail from the model when its auto property is set to TRUE. This property has no effect when the modifier’s auto property is set to
The range for this property is from 0.0 (removes all polygons) to +100.0 (removes no polygons). The default setting is 100.0.
The
#lod modifier can only be added to models created outside of Director in 3D modeling
programs. The value of the
#fromFile. The modifier cannot be added to primitives created within Director.
Example
This statement sets the bias property of the lod modifier of the model named Spaceship to 10. If
lod modifier’s auto property is set to TRUE, the modifier will very aggressively lower the level
the of detail of Spaceship as it moves away from the camera.
member("3D World").model("Spaceship").lod.bias = 10
See also
lod (modifier), auto, level
FALSE.
type property of the model resources used by these models is
bitAnd()
Syntax
bitAnd(integer1, integer2)
Description
Function; converts the two specified integers to 32-bit binary numbers and returns a binary number whose digits are 1’s in the positions where both numbers had a 1, and 0’s in every other position. The result is the new binary number, which Lingo displays as a base 10 integer.
Integer Binary number (abbreviated)
6 00110 7 00111
Result
6 00110
Example
This statement compares the binary versions of the integers 6 and 7 and returns the result as an integer:
put bitAnd(6, 7)
-- 6
See also
bitNot(), bitOr(), bitXor()
Chapter 390
bitmapSizes
Syntax
member(whichFontMember).bitmapSizes the bitmapSizes of member whichFontMember
Description
Font cast member property; returns a list of the bitmap point sizes that were included when the font cast member was created.
Example
This statement displays the bitmap point sizes that were included when cast member 11 was created:
put member(11).bitmapSizes
-- [12, 14, 18]
See also
recordFont, characterSet, originalFont
bitNot()
Syntax
(integer).bitNot bitNot(integer)
Description
Function; converts the specified integer to a 32-bit binary number and reverses the value of each binary digit, replacing 1’s with 0’s and 0’s with 1’s. The result is the new binary number, which Lingo displays as a base 10 integer.
Integer Binary number
1 00000000000000000000000000000001
Result
-2 11111111111111111111111111111110
Example
This statement inverts the binary representation of the integer 1 and returns a new number.
put (1).bitNot
-- -2
See also
bitAnd(), bitOr(), bitXor()
Lingo Dictionary 91
bitOr()
Syntax
bitOr(integer1, integer2)
Description
Function; converts the two specified integers to 32-bit binary numbers and returns a binary number whose digits are 1’s in the positions where either number had a 1, and 0’s in every other position. The result is the new binary number, which Lingo displays as a base 10 integer.
Integer Binary number (abbreviated)
5 0101 6 0110
Result
7 0111
Example
This statement compares the 32-bit binary versions of 5 and 6 and returns the result as an integer:
put bitOr(5, 6)
-- 7
See also
bitNot(), bitAnd(), bitXor()
bitRate
Syntax
member(whichCastMember).bitRate the bitRate of member whichCastMember
Description
Shockwave Audio (SWA) cast member property; returns the bit rate, in kilobits per second (Kbps), of the specified SWA cast member that has been preloaded from the server.
The
bitRate member property returns 0 until streaming begins.
Example
This behavior outputs the bit rate of an SWA cast member when the sprite is first encountered. Dot syntax:
property spriteNum
on beginSprite me
memName = sprite(spriteNum).member.name
put "The bitRate of member"&&memName&&"is"&&member(memName).bitRate end
Chapter 392
Verbo se syntax:
property spriteNum
on beginSprite me
memName = sprite(spriteNum).member.name
put "The bitRate of member"&&memName&&"is"&&member(memName).bitRate end
bitsPerSample
Syntax
member(whichCastMember).bitsPerSample the bitsPerSample of member whichCastMember
Description
Shockwave Audio (SWA) cast member property; indicates the bit depth of the original file that has been encoded for Shockwave Audio (SWA). This property is available only after the SWA sound begins playing or after the file has been preloaded using the
This property can be tested but not set.
Example
This statement assigns the original bit rate of the file used in SWA streaming cast member Paul Robeson to the field cast member How Deep.
preLoadBuffer command.
Dot syntax:
put member "Paul Robeson".bitsPerSample into member "How Deep"
Verbo se syntax:
put the bitsPerSample of member "Paul Robeson" into member "How Deep"
bitXor()
Syntax
bitXor(integer1, integer2)
Description
Function; converts the two specified integers to 32-bit binary numbers and returns a binary number whose digits are 1’s in the positions where the given numbers’ digits do not match, and 0’s in the positions where the digits are the same. The result is the new binary number, which Lingo displays as a base 10 integer.
Integer Binary number (abbreviated)
5 0101 6 0110
Result
3 0011
Lingo Dictionary 93
Example
This statement compares the 32-bit binary versions of 5 and 6 and returns the result as an integer:
put bitXor(5, 6)
-- 3
See also
bitNot(), bitOr(), bitAnd()
blend
Syntax
sprite(whichSprite).blend the blend of sprite whichSprite
Description
Sprite property; sets or determines a sprite’s blend value, from 0 to 100, corresponding to the blend values in the Sprite Properties dialog box.
The possible colors depend on the colors available in the palette, regardless of the monitor’s color depth.
The Director player for Java supports the
blend sprite property for bitmap sprites only.
For best results, use the blend ink with images that have a color depth greater than 8-bit.
Examples
The following statement sets the blend value of sprite 3 to 40 percent. Dot syntax:
sprite(3).blend = 40
Verbo se syntax:
set the blend of sprite 3 to 40
This statement displays the blend value of sprite 3 in the Message window:
put the blend of sprite 3
See also
blendLevel
blend (3D)
Syntax
sprite(whichSprite).camera{(index)}.backdrop[index].blend member(whichCastmember).camera(whichCamera).backdrop[index].blend sprite(whichSprite).camera{(index)}.overlay[index].blend member(whichCastmember).camera(whichCamera).overlay[index].blend member(whichCastmember).shader(whichShader).blend member(whichCastmember).model(whichModel).shader.blend member(whichCastmember).model(whichModel).shaderList{[index]}.blend
Chapter 394
Description
3D backdrop, overlay, and #standard shader property; indicates the opacity of the backdrop, overlay, or shader.
Setting the property is set to
blend property of a shader will have no effect unless the shader’s transparent
TRUE.
The range of this property is 0 to 100, and the default value is 100.
Example
This statement sets the blend property of the shader for the model named Window to 80. If the
transparent property of Window’s shader is set to TRUE, the model will be slightly transparent. member("House").model("Window").shader.blend = 80
See also
bevelDepth, overlay, shadowPercentage, transparent
blendConstant
Syntax
member(whichCastmember).shader(whichShader).blendConstant member(whichCastmember).model(whichModel).shader.blendConstant member(whichCastmember).model(whichModel).shaderList{[index]}.\
blendConstant
Description
3D #standard shader property; indicates the blending ratio used for the first texture layer of the shader.
If the shader’s by the shader’s
useDiffuseWithTexture property is set to TRUE, the texture blends with the color set
diffuse property. If useDiffuseWithTexture is FALSE, white is used for blending.
Each of the other texture layers blends with the texture layer below it. Use the
blendConstantList property to control blending in those texture layers.
The blendConstant property works only when the shader’s blendSource property is set to
#constant. For more information, see blendSource and blendSourceList.
The range of this property is 0 to 100; the default is 50.
Example
In this example, the shader list of the model named MysteryBox contains six shaders. This statement sets the by the settings of the
blendSourceList properties. member("Level2").model("MysteryBox").shaderList[2].\
blendConstant = 20
See also
blendConstantList, blendFunction, blendFunctionList, blendSource, blendSourceList, useDiffuseWithTexture, diffuse, diffuseColor
blendConstant property of the second shader to 20. This property is affected
blendFunction, blendFunctionList, blendSource, and
Lingo Dictionary 95
blendConstantList
Syntax
member(whichCastmember).shader(whichShader).blendConstantList member(whichCastmember).model(whichModel).shader.blendConstant\
List{[index]} member(whichCastmember).model(whichModel).shaderList{[index]}.\
blendConstantList{[index]}
Description
3D #standard shader property; indicates the ratio used for blending a texture layer of the shader with the texture layer below it.
The shader’s texture list and the blend constant list both have eight index positions. Each index position in the blend constant list controls blending for the texture at the corresponding index position in the texture list. You can set all index positions of the list to the same value at one time by not specifying the optional position at a time.
blendConstantList property works only when the blendSource property of the
The corresponding texture layer is set to #constant.
The range of this property is 0 to 100; the default is 50.
Example
In this example, the shader list of the model named MysteryBox contains six shaders. This statement shows the
blendConstant property of each of the textures used by the second shader.
This property is affected by the settings of the
blendSource, and blendSourceList properties.
index parameter. Use the index parameter to set the list one index
blendFunction, blendFunctionList,
put member("Level2").model("MysteryBox").shaderList[2].\
blendConstantList
-- [20.0000, 50.0000, 50.0000, 50.0000, 20.0000, 50.0000, \
50.0000, 50.0000]
See also
blendConstant, blendFunction, blendFunctionList, blendSource, blendSourceList, useDiffuseWithTexture, diffuse, diffuseColor
blendFactor
Syntax
member(whichCastmember).model(whichModel).keyframePlayer.\
blendFactor member(whichCastmember).model(whichModel).bonesPlayer.blendFactor
Description
3D keyframePlayer and bonesPlayer modifier property; indicates the amount by which a motion is combined with the motion that preceded it.
The range of this property is 0 to 100, and the default value is 0.
Chapter 396
BlendFactor is used only when the autoblend property of the modifier is set to FALSE. If the
value of the
blendFactor property is 100, the current motion will have none of the
characteristics of the motion that preceded it. If the value of blendFactor is 0, the current motion will have all of the characteristics of the motion that preceded it and none of its own. If the value of
blendFactor is 50, the current motion will be a synthesis equally composed of its
own characteristics and those of the motion that preceded it. The value blendFactor can be varied over time to create transitions unlike the linear transition created when the modifier’s
autoblend property is set to TRUE.
Example
This statement sets the blendFactor property of model Alien3 to 50. If the modifier’s
autoblend property is FALSE, each motion in the playlist of the keyframePlayer for Alien3 will
be an even mixture of itself and the motion that preceded it.
member("newaliens").model("Alien3").keyframePlayer.blendFactor = 50
See also
autoblend, keyframePlayer (modifier)
blendFunction
Syntax
member(whichCastmember).shader(whichShader).blendFunction member(whichCastmember).model(whichModel).shader.blendFunction member(whichCastmember).model(whichModel).shaderList{[index]}.\
blendFunction
Description
3D #standard shader property; indicates the type of blending used by the first texture layer of the shader.
If the shader’s by the shader’s
useDiffuseWithTexture property is set to TRUE, the texture blends with the color set
diffuse property. If useDiffuseWithTexture is FALSE, white is used for blending.
Each of the other texture layers blends with the texture layer below it. Use the
blendFunctionList property to control blending in those texture layers.
The blendFunction property can have the following values:
#multiply multiplies the RGB values of the texture layer by the color being used for blending
(see above).
#add adds the RGB values of the texture layer to the color being used for blending, and then
clamps to 255.
#replace prevents the texture from being blended with the color set by the shader’s diffuse property.
#blend combines the colors of the texture layer with the color being used for blending in the ratio
set by the The default value of this property is
blendConstant property.
#multiply.
Lingo Dictionary 97
Example
In this example, the shader list of the model named MysteryBox contains six shaders. This statement sets the
blendSource, blendSourceList, blendConstant, and blendConstantList properties. member("Level2").model("MysteryBox").shaderList[2].\
See also
blendConstant, blendConstantList, blendFunctionList, blendSource, blendSourceList, useDiffuseWithTexture, diffuse, diffuseColor
blendFunction property of the second shader to #blend. This enables the settings of the
blendFunction = #blend
blendFunctionList
Syntax
member(whichCastmember).shader(whichShader).\
blendFunctionList{[index]} member(whichCastmember).model(whichModel).shader.\
blendFunctionList{[index]} member(whichCastmember).model(whichModel).shaderList{[index]}.\
blendFunctionList{[index]}
Description
3D #standard shader property; a linear list that indicates the manner in which each texture layer blends with the texture layer below it.
The shader’s texture list and blend function list both have eight index positions. Each index position in the blend function list controls blending for the texture at the corresponding index position in the texture list. You can set all index positions of the list to the same value at one time by not specifying the optional
index parameter. Use the index parameter to set the list one index
position at a time. Each index position of the blend function list can have one of the following values:
#multiply multiplies the RGB values of the texture layer by the RGB values of the texture layer
below it.
#add adds the RGB values of the texture layer to the RGB values of the texture layer below it, and
then clamps to 255.
#replace causes the texture to cover the texture layer below it. No blending occurs. #blend causes blending to be controlled by the value of the blendSource property, which allows
alpha blending. The default value of this property is
Example
#multiply.
In this example, the shaderList property of the model named MysteryBox contains six shaders. This statement shows that the value of the fourth index position of the the second shader is set to model will be controlled by the settings of the
blendConstantList, diffuse, diffuseColor, and useDiffuseWithTexture properties.
#blend. Blending of the fourth texture layer of the second shader of the
blendSource, blendSourceList, blendConstant,
blendFunctionList property of
put member("Level2").model("MysteryBox").shaderList[2].\
blendFunctionList[4]
-- #blend
See also
blendConstant, blendConstantList, blendFunction, blendSource, blendSourceList, diffuse, diffuseColor, useDiffuseWithTexture
Chapter 398
blendLevel
Syntax
sprite(whichSpriteNumber).blendLevel the blendLevel of sprite whichSpriteNumber
Description
Sprite property; allows the current blending value of a sprite to be set or accessed. The possible range of values is from 0 to 255. This differs from the Sprite Inspector, which shows values in the range 0 to 100. The results are the same, the scales simply differ.
This property is the equivalent of the
Example
sprite(3).blendlevel = 99
See also
blend
blend sprite property.
blendRange
Syntax
member(whichCastmember).modelResource(whichModelResource)\
.blendRange.start modelResourceObjectReference.blendRange.end member(whichCastmember).modelResource(whichModelResource)\
.blendRange.start modelResourceObjectReference.blendRange.end
Description
3D property; when used with a model resource whose type is #particle, allows you to get or set the start and end of the model resource’s blend range.
The opacity of particles in the system is interpolated linearly between
blendRange.end over the lifetime of each particle.
This property’s value must be greater than or equal to 0.0 and less than or equal to 100.0. The default value for this property is 100.0.
blendRange.start and
Example
This statement sets the blendRange properties of model resource ThermoSystem, which is of the type #particle.
The first line sets the start value to 100, and the second line sets the end value to 0. The effect of this statement is that the particles of ThermoSystem are fully opaque when they first appear, and then gradually fade to transparent during their lifetime.
member("Heater").modelResource("ThermoSystem").blendRange.\
start = 100.0 member("Heater").modelResource("ThermoSystem").blendRange.\
end = 0.0
Lingo Dictionary 99
blendSource
Syntax
member(whichCastmember).shader(whichShader).blendSource member(whichCastmember).model(whichModel).shader.blendSource member(whichCastmember).model(whichModel).shaderList{[index]}.\
blendSource
Description
3D #standard shader property; indicates whether blending of the first texture layer in the shader’s texture list is based on the texture’s alpha information or a constant ratio.
If the shader’s
useDiffuseWithTexture property is set to TRUE, the texture blends with the color
set by the shader’s diffuse property. If useDiffuseWithTexture is FALSE, white is used for blending.
Each of the other texture layers blends with the texture layer below it. Use the
blendSourceList
property to control blending in those texture layers.
blendSource property works only when the shader’s blendFunction property is set to
The
#blend.
The possible values of this property are as follows:
#alpha causes the alpha information in the texture to determine the blend ratio of each pixel of
the texture with the color being used for blending (see above).
#constant causes the value of the shader’s blendConstant property to be used as the blend ratio
for all the pixels of the texture. The default value of this property is
Example
#constant.
In this example, the shader list of the model named MysteryBox contains six shaders. This statement sets the
#constant. This enables the settings of the blendConstant and blendConstantList properties. member("Level2").model("MysteryBox").shaderList[2].\
blendSource = #constant
blendSource property of the first texture used by the second shader to
See also
blendSourceList, blendFunction, blendFunctionList, blendConstant, blendConstantList, useDiffuseWithTexture, diffuse, diffuseColor
blendSourceList
Syntax
member(whichCastmember).shader(whichShader).\
blendSourceList[index] member(whichCastmember).model(whichModel).shader.\
blendSourceList{[index]} member(whichCastmember).model(whichModel).\
shaderList{[index]}.blendSourceList{[index]}
Chapter 3100
Loading...