User Guide
744 Chapter 14: Properties
drag
Usage
member(whichCastmember).modelResource(whichModelResource).drag
Description
3D #particle model resource property; indicates the percentage of each particle’s velocity that is
lost in each simulation step. This property has a range of 0 (no velocity lost) to 100 (all velocity
lost and the particle stops moving). The default value is 0.
Example
In this example, ThermoSystem is a model resource whose type is #particle. This statement sets
the
drag property of ThermoSystem to 5, applying a large resistance to the motion of the
particles of ThermoSystem and preventing them from traveling very far.
member("Fires").modelResource("ThermoSystem").drag = 5
See also
wind, gravity
drawRect
Usage
-- Lingo syntax
windowObjRef.drawRect
// JavaScript syntax
windowObjRef.drawRect;
Description
Window property; identifies the rectangular coordinates of the Stage of the movie that appears in
a window. Read/write.
The coordinates are given as a rectangle, with entries in the order left, top, right, and bottom.
This property is useful for scaling or panning movies, but it does not rescale text and field cast
members. Scaling bitmaps can affect performance.
Example
This statement displays the current coordinates of the movie window called Control Panel:
-- Lingo syntax
put(window("Control Panel").drawRect)
// JavaScript syntax
put(window("Control Panel").drawRect);
The following statement sets the rectangle of the movie to the values of the rectangle named
movieRectangle. The part of the movie within the rectangle is what appears in the window.
-- Lingo syntax
movieRectangle = rect(10, 20, 200, 300)
window("Control Panel").drawRect = movieRectangle