![MACROMEDIA FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY Manual Download Page 383](http://html1.mh-extra.com/html/macromedia/flash-mx-2004-flash-javascript-dictionary/flash-mx-2004-flash-javascript-dictionary_manual_3377988383.webp)
The C-level API
383
Note:
Do not modify the returned buffer pointer, or you might corrupt the data structures of the
JavaScript interpreter.
Arguments
JSObject
*obj
•
Typically, this argument is passed in and converted using the
JS_ValueToObject()
function.
Returns
A pointer to a null-terminated string. The caller should not free this string when it finishes.
JSObject *JS_NewArrayObject()
Usage
JSObject *JS_NewArrayObject( JSContext *cx, unsigned int length [, jsval *v ] )
Description
Method; creates a new object that contains an array of
JSVals
.
Arguments
JSContext
*cx
,
unsigned int
length
,
jsval
*v
•
The
cx
argument is the opaque
JSContext
pointer that passes to the JavaScript function.
•
The
length
argument is the number of elements that the array can hold.
•
The
v
argument is an optional pointer to the
jsvals
to be stored in the array. If the return
value is not
null
,
v
is an array that contains
length
elements. If the return value is
null
,
the initial content of the array object is undefined and can be set using the
JS_SetElement()
function.
Returns
A pointer to a new array object or the value
null
upon failure.
long JS_GetArrayLength()
Usage
long JS_GetArrayLength(JSContext *cx, JSObject *obj)
Description
Method; given a pointer to an array object, gets the number of elements in the array.
Arguments
JSContext
*cx
,
JSObject
*obj
•
The
cx
argument is the opaque
JSContext
pointer that passes to the JavaScript function.
•
The
obj
argument is a pointer to an array object.
Returns
The number of elements in the array or -1 upon failure.
Summary of Contents for FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY
Page 1: ...Flash JavaScript Dictionary ...
Page 16: ...16 Contents ...
Page 40: ...40 Chapter 2 Top level functions ...
Page 368: ...368 Chapter 3 Objects ...