The Flash Objects Api - MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Reference

Dreamweaver api reference
Table of Contents

Advertisement

Adding a Flash Element to a menu
A Flash element can also reside on the Insert menu, or on other menus, in Dreamweaver. Use
the JavaScript function
dom.insertFlashElement()
with the menus.xml file format (see
"Menus and Menu Commands" in Extending Dreamweaver) to specify the Flash element
menu item location. The following example shows how code within the menus.xml file makes
a Navigation Flash element available on the Insert > Flash Element menu:
<menuitem name="Navigation"
key=""command="dw.getDocumentDOM().insertFlashElement('nav.swc')"
enabled="(dw.getFocus() != 'browser') && (dw.getDocumentDOM() != null && ¬
dw.getDocumentDOM().getParseMode() == 'html')"
id="DWMenu_Insert_FlashElement_Nav" />

The Flash Objects API

The Flash Objects API lets extension developers build objects that create simple Flash content
through Flash Generator. This API provides a way to set parameters in a Flash Generator
template and output a SWF or image file. The API lets you create new Flash objects as well as
read and manipulate existing Flash objects. The Flash button and Flash text features are built
using this API.
The SWT file is a Flash Generator Template file, which contains all the information you need
to construct a Flash Object file. These API functions let you create a new SWF file (or image
file) from a SWT file by replacing the parameters of the SWT file with real values. For more
information on Flash, see the Flash documentation. The following functions are methods of
the
object.
SWFFile
SWFFile.createFile()
Description
This function generates a new Flash Object file with the specified template and array of
parameters. It also creates a GIF, PNG, JPEG, and MOV version of the title if filenames for
those formats are specified.
If you want to specify an optional parameter that follows optional parameters that you do not
want to include, you need to specify empty strings for the unused parameters. For example, if
you want to specify a PNG file, but not a GIF file, you need to specify an empty string before
specifying the PNG filename.
The Flash Objects API
63

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Dreamweaver 8

Table of Contents