![MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference Download Page 554](http://html1.mh-extra.com/html/macromedia/director-mx-2004-director-scripting/director-mx-2004-director-scripting_reference_3321720554.webp)
554
Chapter 12: Methods
// JavaScript syntax
_global.grandTotal;
function mouseUp() {
if (_global.grandTotal == 500) {
_movie.stopEvent();
}
}
Neither subsequent scripts nor other behaviors on the sprite receive the event if it is stopped in
this manner.
See also
Movie
stream()
Usage
-- Lingo syntax
memberObjRef
.stream(
numberOfBytes
)
// JavaScript syntax
memberObjRef
.stream(
numberOfBytes
);
Description
Command; manually streams a portion of a specified Flash movie cast member into memory.
The
stream
command returns the number of bytes actually streamed. Depending on a variety of
conditions (such as network speed or the availability of the requested data), the number of bytes
actually streamed may be less than the number of bytes requested.
You can always use the
stream
command for a cast member regardless of the cast member’s
streamMode
property.
Parameters
numberOfBytes
Optional. An integer that specifies the number of bytes to stream. If you omit
the
numberOfBytes
parameter, Director tries to stream the number of bytes set by the cast
member’s
bufferSize
property.
Example
The following frame script checks to see if a linked Flash movie cast member has streamed into
memory by checking its
percentStreamed
property. If the cast member is not completely loaded
into memory, the script tries to stream 32,000 bytes of the movie into memory.
The script also saves the actual number of bytes streamed in a variable called
bytesReceived
. If
the number of bytes actually streamed does not match the number of bytes requested, the script
updates a text cast member to report the number of bytes actually received. The script keeps the
playhead looping in the current frame until the cast member has finished loading into memory.
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...