As with other objects, you add a Flash element to the Insert Bar using the button tag. However, a button tag for a Flash element must have both file and command attributes to add the element successfully to the document (see the button tag details in "Insert Bar Objects" in Extending Dreamweaver). Use the file attribute to tell Dreamweaver where the source file for the element resides relative to the Objects folder. Then, use the command attribute to tell Dreamweaver to use the dom.insertFlashElement() function when the user 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 or menubutton tag, depending on where you want the Flash element button to appear):
<button id="FlashElement_Nav"
name="Navigation"
file="FlashElements\nav.swc"
command="dw.getDocumentDOM().insertFlashElement('nav.swc')" />
|
NOTE |
|
The image on the Insert bar for the Flash element is determined within the SWC file. Also, the |
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/dreamweaver/8/apiref/06_flas4.htm