C-Level Extensibility And The Javascript Interpreter - MACROMEDIA FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY Manual

Flash javascript dictionary
Hide thumbs Also See for FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY:
Table of Contents

Advertisement

Windows 98:
C:\Windows\Application Data\Macromedia\Flash MX 2004\ <language>\
Configuration\Templates\External Libraries
Macintosh OS X:
Hard Drive/Users/<userName>/Library/Application Support/Macromedia/
Flash MX 2004/<language>/Configuration/Templates/External Libraries
Create a JSFL file that calls the functions.
4.
Run the JSFL file from the Commands menu in the Flash authoring environment.
5.
For more information, see

C-level extensibility and the JavaScript interpreter

The C code in the DLL or shared library interacts with the Flash JSAPI at three different times:
At startup, to register the library's functions
When the C function is called, to unpack the arguments that are being passed from JavaScript
to C
Before the C function returns, to package the return value
To accomplish these tasks, the interpreter defines several data types and exposes an API.
Definitions for the data types and functions that are listed in this section appear in the
mm_jsapi.h file. For your library to work properly, you must include the mm_jsapi.h file at the
top of each file in your library, with the following line:
#include "mm_jsapi.h"
Including the mm_jsapi.h file includes the mm_jsapi_environment.h file, which defines the
MM_Environment structure.
To get a copy of the mm_jsapi.h file, download the sample ZIP or SIT file (see
implementation" on page
#ifndef _MM_JSAPI_H_
#define _MM_JSAPI_H_
/*****************************************************************************
* Public data types
****************************************************************************/
typedef struct JSContext JSContext;
typedef struct JSObject JSObject;
typedef long jsval;
#ifndef JSBool
typedef long JSBool;
#endif
typedef JSBool (*JSNative)(JSContext *cx, JSObject *obj, unsigned int argc,
jsval *argv, jsval *rval);
/* Possible values for JSBool */
#define JS_TRUE 1
370
Chapter 4: C-Level Extensibility
"Sample implementation" on page
374), or copy the following code into a file that you name mm_jsapi.h:
374.
"Sample

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents