
4
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
var sysobj = {};
sysobj._load = load; // Hide the load function
load = null; // Make it unavailable unpriviliged code.
sysobj.load = function(fname){
// User-defined code to validate/modify fname
return this._load(fname);
}
// Grab the global object.
var global = getGlobal();
// Now protect sysobj and make it available as
// "system" globally. Also, set its attributes
// so that it is read-only and not deletable.
global["system"] = protectObject(sysobj);
setAttributes(global, "system", false, true, true);
// Now add a global load() function for compatibility.
// Make it read-only and nondeletable.
global["load"] = function(path){
return system.load(path);
}
setAttributes(global, "load", false, true, true);
See also
LoadVars class
setAttributes()
setAttributes(object, propName, enumerable, readonly, permanent)
Prevents certain methods and properties from being enumerated, written, and deleted. In a server-side script, all
properties in an object are enumerable, writable, and deletable by default. Call
setAttributes() to change the default
attributes of a property or to define constants.
Availability
Flash Media Server 2
Parameters
object An Object.
propName A string indicating the name of the property in the object parameter. Setting attributes on nonexistent
properties has no effect.
enumerable One of the following values: true, false, or null. Makes a property enumerable if true or
nonenumerable if
false; a null value leaves this attribute unchanged. Nonenumerable properties are hidden from
enumerations (
forvariinobj).
readonly One of the following values: true, false, or null. Makes a property read-only if true or writable if false;
a
null value leaves this attribute unchanged. Any attempt to assign a new value is ignored. Typically, you assign a value
to a property while the property is writable and then make the property read-only.
Komentáře k této Příručce