MACROMEDIA FLASH 8-USING FLASH Use Manual page 623

Using flash
Table of Contents

Advertisement

First, create a file named button.jsfl and place it in your Commands folder. Place the
following code into the file and save the file:
// Create an XML to UI dialog box using the XML definition
// in the button.xml file
var buttonDlg = fl.getDocumentDOM().xmlPanel( fl.configURI + "Commands/
button.xml" );
Second, create a file named button.xml and place it in your Commands folder. Place the
following code into the file and save the file:
<?xml version="1.0"?>
<dialog id="button-dialog" title="Button Example" buttons="accept, cancel">
<grid>
<columns>
<column/>
</columns>
<rows>
<row>
<label width="150" value="The following buttons will send text to
the Output Panel"/>
</row>
<row>
<button id="helloBtn"
oncommand="fl.trace('Hello')"/>
</row>
<row>
<button id="worldBtn" label="world" oncommand="fl.trace('world')"/
>
</row>
</rows>
</grid>
</dialog>
The
command now appears on the Commands menu. If you have a Flash document
button
open, you can select the
defined by button.xml appears.
label="Hello"
command from the Commands menu and the dialog box
button
<button>
623

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents