User Guide

592
setCollisionCallback()
Syntax
member(whichCastmember).model(whichModel).collision.\
setCollisionCallback (#handlerName, scriptInstance)
Description
3D collision command; registers the handler #handlerName in the given scriptInstance to be called
when whichModel is involved in a collision.
This command works only if the model’s
collision.enabled property is TRUE. The default
behavior is determined by the value of collision.resolve, you can override it using the
collision.resolveA and/or the collision.resolveB commands. Do not use the updateStage
command in the specified handler.
This command is a shorter alternative to using the
registerScript command for collisions, but
there is no difference in the overall result. This command can be considered to perform a small
subset of the
registerScript command functionality.
Example
This statement causes the #bounce handler in the cast member colScript to be called when the
model named Sphere collides with another model:
member("3d world").model("Sphere").collision.\
setCollisionCallback\
(#bounce, member("colScript"))
See also
collisionData, collision (modifier), resolve, resolveA, resolveB,
registerForEvent(), registerScript(), sendEvent
setFlashProperty()
Syntax
sprite(spriteNum).setFlashProperty("targetName", #property, newValue)
Description
Function; allows Lingo to call the Flash action script function setProperty() on the given Flash
sprite. Use the
setFlashProperty() function to set the properties of movie clips or levels within a
Flash movie. This is similar to setting sprite properties within Director.
The
targetName is the name of the movie clip or level whose property you want to set within the
given Flash sprite.
The
#property is the name of the property to set. You can set the following movie clip properties:
#posX, #posY, #scaleX, #scaleY, #visible, #rotate, #alpha, and #name.
To set a global property of the Flash sprite, pass an empty string as the
targetName. You can set the
global Flash properties:
#focusRect and #spriteSoundBufferTime.
See the Flash documentation for descriptions of these properties.