Parameters
An object.
obj
A string; the URL to upload variables. The name of the property that exists in
propName
the
parameter. Setting attributes on nonexistent properties has no effect.
obj
One of the following values:
,
, or
. Makes a property
enumerable
true
false
null
enumerable if
or nonenumerable if
; a
value leaves this attribute unchanged.
true
false
null
Nonenumerable properties are hidden from enumerations (
).
for var i in obj
One of the following values:
,
, or
. Makes a property read-only if
readonly
true
false
null
or writable if
; a
value leaves this attribute unchanged. Any attempt to assign
true
false
null
a new value will be ignored. Typically, you assign a value to a property while the property is
writable and then make the property read-only.
One of the following values:
,
, or
. Makes a property
permanent
true
false
null
permanent (nondeletable) if
or deletable if
; a
value leaves this attribute
true
false
null
unchanged. Any attempt to delete a permanent property (by calling
) is
delete obj.prop
ignored.
Description
Method (global); lets you prevent certain methods and properties from being enumerated,
writable, and deletable.
In a Flash Media Server server-side script, all properties in an object are always enumerable,
writable, and deletable. You can call
to change the default attributes of a
setAttributes()
property or to define constants.
Example
The following code prevents the
method from appearing in enumerations:
__resolve
Object.prototype.__resolve = function(methodName){ ... };
setAttributes( Object.prototype, "__resolve", false, null, null );
The following example creates three constants on a Constants object and makes them
permanent and read-only:
Constants.Kilo = 1000; setAttributes(Constants, "Kilo", null, true, true);
Constants.Mega = 1000*Constants.Kilo;
setAttributes(Constants, "Mega", null, true, true);
Constants.Giga = 1000*Constants.Mega; setAttributes(Constants, "Giga",
null, true, true);
114
Server-Side ActionScript Language Reference
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?