streamSize
1019
Example
The following statement links the file BigBand.swa to an SWA streaming cast member. The
linked file is on the disk MyDisk in the folder named Sounds.
-- Lingo syntax
member("SWAstream").streamName = "MyDisk/sounds/BigBand.swa"
// JavaScript syntax
member("SWAstream").streamName = "MyDisk/sounds/BigBand.swa";
streamSize
Usage
-- Lingo syntax
memberObjRef
.streamSize
// JavaScript syntax
memberObjRef
.streamSize;
Description
Cast member property; reports an integer value indicating the total number of bytes in the stream
for the specified cast member. The
streamSize
property returns a value only when the Director
movie is playing.
This property can be tested but not set.
Example
The following frame script checks to see if a Flash movie cast member named Intro Movie has
finished streaming into memory. If it hasn’t, the script updates a field cast member to indicate the
number of bytes that have been streamed (using the
bytesStreamed
member property) and the
total number of bytes for the cast member (using the
streamSize
member property). The script
keeps the playhead looping in the current frame until the movie finishes loading into memory.
-- Lingo syntax
on exitFrame
if member("Intro Movie").percentStreamed < 100 then
member("Message Line").text = \
string(member("Intro Movie").bytesStreamed) && "of" && \
string(member("Intro Movie").streamSize) && \
"bytes have downloaded so far."
_movie.go(_movie.frame)
end if
end
// JavaScript syntax
function exitFrame() {
var pctStm = member("Intro Movie").percentStreamed;
var strSs = new String(member("Intro Movie").streamSize);
var strIm = new String(member("Intro Movie").bytesStreamed);
if (pctStm < 100) {
member("Message Line").text = " of " + strSS +
" bytes have downloaded so far.";
_ movie.go(_movie.frame);
}
}
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...