
<button>
623
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.con "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" label="Hello"
oncommand="fl.trace('Hello')"/>
</row>
<row>
<button id="worldBtn" label="world" oncommand="fl.trace('world')"/
>
</row>
</rows>
</grid>
</dialog>
The
button
command now appears on the Commands menu. If you have a Flash document
open, you can select the
button
command from the Commands menu and the dialog box
defined by button.xml appears.
Summary of Contents for FLASH 8-FLASH
Page 1: ...Using Flash ...
Page 12: ...12 Contents ...
Page 110: ...110 Using Symbols Instances and Library Assets ...
Page 128: ...128 Working with Color Strokes and Fills ...
Page 156: ...156 Drawing ...
Page 190: ...190 Working with Text ...
Page 224: ...224 Working with Graphic Objects ...
Page 270: ...270 Creating Motion ...
Page 310: ...310 Working with Video ...
Page 362: ...362 Working with Screens Flash Professional Only ...
Page 386: ...386 Creating Multilanguage Text ...
Page 454: ...454 Data Integration Flash Professional Only ...
Page 500: ...500 Publishing ...
Page 534: ...534 Creating Accessible Content ...