Description
Control tag; Creates a color picker control (this is not part of the XUL standard). This tag is
specific to Flash and is not a part of the XUL tag set.
Example
The following example uses the JavaScript API to create a new command that appears on the
Commands menu. Create two files, as described in this section, and place them in your
Commands folder in your user-level configuration folder. For more information, see
"Configuration folders installed with Flash" in Getting Started with Flash.
First, create a file named setcolor.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 setcolor.xml file
var setcolorDlg = fl.getDocumentDOM().xmlPanel( fl.configURI + "Commands/
setcolor.xml" );
if (setcolorDlg.dismiss == "accept") {
fl.getDocumentDOM().setFillColor(setcolorDlg.fillColor);
fl.getDocumentDOM().setStrokeColor(setcolorDlg.strokeColor);
}
Second, create a file named setcolor.xml and place it in your Commands folder. Place the
following code into the file and save the file:
<dialog id="setcolor-dialog" title="Set Color" buttons="accept, cancel">
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row align="left">
<label value="Set fill color: " control="fillColor" align="left"/>
<colorchip id="fillColor" color="#000000"/>
</row>
<row align="left">
<label value="Set stroke color:" control="strokeColor"
align="left"/>
<colorchip id="strokeColor" color="#000000"/>
</row>
</rows>
</grid>
</dialog>
628
XML to UI
Need help?
Do you have a question about the FLASH 8-USING FLASH and is the answer not in the manual?