MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 6

Extending flash
Table of Contents

Advertisement

The Flash JavaScript API is designed to resemble the Macromedia Dreamweaver and
Macromedia Fireworks JavaScript API (which were designed based on the Netscape JavaScript
API). The Flash JavaScript API is based on a Document Object Model (DOM), which allows
Flash documents to be accessed using JavaScript objects. The Flash JavaScript API includes all
elements of the Netscape JavaScript API, plus the Flash DOM. These added objects and their
methods and properties are described in this document. You can use any of the elements of
the native JavaScript language in a Flash script, but only elements that make sense in the
context of a Flash document will have an effect.
The JavaScript API also contains a number of methods that let you implement extensibility
using a combination of JavaScript and custom C code. For more information, see
Chapter 3,
"C-Level Extensibility," on page
533.
The JavaScript interpreter in Flash is the Mozilla SpiderMonkey engine, version 1.5, which is
available on the web at www.mozilla.org/js/spidermonkey/. SpiderMonkey is one of the two
reference implementations of the JavaScript language developed by Mozilla.org. It is the same
engine that is embedded in the Mozilla browser.
SpiderMonkey implements the core JavaScript language as defined in the ECMAScript
(ECMA-262) edition 3 language specification and it is fully compliant with the specification.
Only the browser-specific host objects, which are not part of the ECMA-262 specification, are
not supported. Similarly, many JavaScript reference guides distinguish between core
JavaScript and client-side (browser-related) JavaScript. Only core JavaScript applies to the
Flash JavaScript interpreter.
Creating JSFL files
You can use Macromedia Flash 8 or your preferred text editor to write and edit Flash
JavaScript (JSFL) files. If you use Flash, these files have a .jsfl extension by default.
You can also create a JSFL file by selecting commands in the History panel and then clicking
the Save button in the History panel or selecting Save As Command from the options pop-up
menu. The command (JSFL) file is saved in the Commands folder (see
"Saving JSFL files"
on page
7). You can then open the file and edit it the same as any other script file.
The History panel provides some other useful options as well. You can copy selected
commands to the Clipboard, and you can view JavaScript commands that are generated while
you are working in Flash.
6
Introduction

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents