MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 456

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

Parent tag
<dialog>, <hbox>,
Description
Control tag; creates a listbox control to contain
Example
The following example modifies the
a
control instead of a
<listbox>
skewSelection() method.
The 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 skewlist.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 skew.xml file
var skewlistDlg = fl.getDocumentDOM().xmlPanel( fl.configURI + "Commands/
skewlist.xml" );
// Place the values of xskew and yskew from the dialog box into local
variables.
// Note that we cast (convert) the return value of skewlistDlg["xSkew"] to a
number before assigning
// it to xSkew because the skewSelection method takes numbers as parameters.
var xSkew = Number(skewlistDlg.xSkew);
var ySkew = Number(skewlistDlg.ySkew);
var edge = skewlistDlg.edge;
if (skewlistDlg.dismiss == "accept") {
// Place the values of xSkew and ySkew from the dialog box
// into local variables. The code casts (converts) the values from the
// dialog box to a number before assigning them to the local variables
// because the skewSelection() method takes numbers for
// the xSkew and ySkew parameters.
var xSkew = Number(skewlistDlg.xSkew);
var ySkew = Number(skewlistDlg.ySkew);
var edge
// check for valid input because sending 0 or undefined to
// skewSelection() will cause the object to disappear.
var inputIsValid = true;
if (xSkew == 0 || isNaN(xSkew)) {
inputIsValid = false;
}
if (ySkew == 0 || isNaN(ySkew)) {
inputIsValid = false;
}
456
Appendix B: XML to UI
,
<row>
<vbox>
skew
<menulist>
= skewlistDlg.edge;
tags.
<listitem>
command example from
control for the
edge
so that it uses
<popupslider>
parameter to the JavaScript

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents