<listbox>
633
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.con "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 = skewlistDlg.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;
}
// Call skewSelection() to carry out the resizing command.
if (inputIsValid ) {
fl.getDocumentDOM().skewSelection(xSkew, ySkew, edge);
}
}
Содержание 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 ...