628
XML to UI
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.con "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>
Содержание FLASH 8-FLASH
Страница 1: ...Using Flash ...
Страница 12: ...12 Contents ...
Страница 110: ...110 Using Symbols Instances and Library Assets ...
Страница 128: ...128 Working with Color Strokes and Fills ...
Страница 156: ...156 Drawing ...
Страница 190: ...190 Working with Text ...
Страница 224: ...224 Working with Graphic Objects ...
Страница 270: ...270 Creating Motion ...
Страница 310: ...310 Working with Video ...
Страница 362: ...362 Working with Screens Flash Professional Only ...
Страница 386: ...386 Creating Multilanguage Text ...
Страница 454: ...454 Data Integration Flash Professional Only ...
Страница 500: ...500 Publishing ...
Страница 534: ...534 Creating Accessible Content ...