on savedLocal
193
Example
The following handler overrides the behavior’s values set in the Parameters dialog box for the
behavior. New values are contained in the list
currentInitializerList
. Normally, the
Parameters dialog box allows the user to set the mass and gravitational constants. However, this
handler assigns these parameters constant values without displaying a dialog box:
-- Lingo syntax
property mass
property gravitationalConstant
on runPropertyDialog me, currentInitializerList
--force mass to 10
currentInitializerList.setaProp(#mass, 10)
-- force gravitationalConstant to 9.8
currentInitializerList.setaProp(#gravitationalConstant, 9.8)
return currentInitializerList
end
// JavaScript syntax
function runPropertyDialog(currentInitializerList) {
//force mass to 10
currentInitializerList.setaProp("mass", 10)
//force gravitationalConstant to 9.8
currentInitializerList.setaProp("gravitationalConstant", 9.8)
return(currentInitializerList)
}
See also
on getBehaviorDescription
,
on getPropertyDescriptionList
on savedLocal
Usage
-- Lingo syntax
on savedLocal
statement(s)
end
// JavaScript syntax
function savedLocal() {
statement(s);
}
Description
System message and event handler; this property is provided to allow for enhancements in future
versions of Shockwave Player.
See also
allowSaveLocal
Summary of Contents for DIRECTOR MX 2004
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...