Inserting Flash Elements - MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Reference

Dreamweaver api reference
Table of Contents

Advertisement

Inserting Flash elements

Flash elements are installed through the Extension Manager. Dreamweaver adds Flash
elements to documents in the same manner as the objects that are available on the Insert bar
or the Insert menu (for details about working with Dreamweaver objects, see "Insert Bar
Objects" in Extending Dreamweaver). By clicking on objects on the Insert bar or selecting
menu options from the Insert menu, users can add strings of code to documents. Flash
elements are available to users through the Insert bar or the Insert menu (meaning you can
add a valid Flash element file that is already installed in the Configuration/Objects/
FlashElements folder or one of its subfolders to the Insert bar or Insert menu). Extension
developers can use the JavaScript function
file to add available Flash elements to a document. When the user selects the Flash element
object, Dreamweaver unpacks the SWC file, which contains Flash content (SWF file) and a
file that details the parameters the user can edit. Dreamweaver then inserts the SWF file into
the user's document.
Adding a Flash element to the Insert Bar
As with other objects, you add a Flash element to the Insert Bar using the
However, a
tag for a Flash element must have both
button
add the element successfully to the document (see the button tag details in "Insert Bar
Objects" in Extending Dreamweaver). Use the
source file for the element resides relative to the Objects folder. Then, use the
attribute to tell Dreamweaver to use the
clicks the button on the Insert bar.
The following example shows the code to place in the inserbar.xml file (either as a child of the
appropriate
category
button to appear):
<button id="FlashElement_Nav"
name="Navigation"
file="FlashElements\nav.swc"
command="dw.getDocumentDOM().insertFlashElement('nav.swc')" />
The image on the Insert bar for the Flash element is determined within the SWC file.
Also, the button tag for a Flash element object must have a file attribute defined.
62
Flash Integration
dom.insertFlashElement()
dom.insertFlashElement()
or
tag, depending on where you want the Flash element
menubutton
and
file
attribute to tell Dreamweaver where the
file
in the object definition
tag.
button
attributes to
command
command
function when the user

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver 8

Table of Contents