cacheSize()
249
// JavaScript syntax
function resetCache() {
current = cacheDocVerify();
if (current == symbol("once")) {
alert("Turning cache verification on");
cacheDocVerify(symbol("always"))
}
}
Parameters
cacheSetting
Optional. A symbol that specifies how often the contents of a page on the Internet
are refreshed. Possible values are
#once
(default) and
#always
. Specifying
#once
tells a movie to
get a file from the Internet once and then use the file from the cache without looking for an
updated version on the Internet. Specifying
#always
tells a movie to try to get an updated version
of the file each time the movie calls a URL.
See also
cacheSize()
,
clearCache
cacheSize()
Usage
-- Lingo syntax
cacheSize
Size
cacheSize()
// JavaScript syntax
cacheSize(
Size);
cacheSize();
Description
Function and command; sets the cache size of Director.
The
cacheSize
function is valid only for movies running in Director or as projectors. This
function is not valid for movies with Shockwave content because they use the network settings of
the browser in which they run.
Parameters
newCacheSize
Optional. An integer that specifies the cache size, in kilobytes.
Example
This handler checks whether the browser’s cache setting is less than 1 MB. If it is, the handler
displays an alert and sets the cache size to 1 MB:
-- Lingo syntax
on checkCache if
cacheSize()<1000 then
alert "increasing cache to 1MB"
cacheSize 1000
end if
end
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...