Adobe Extending Flash Professional CS5 Manuel d'utilisateur Page 383

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 565
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 382
361
EXTENDING FLASH PROFESSIONAL
Path object
Last updated 5/2/2011
var myPath = fl.drawingLayer.newPath();
myPath.addPoint(0, 0);
myPath.addPoint(0, 30);
myPath.addPoint(30, 30);
myPath.addPoint(30, 0);
myPath.addPoint(0, 0);
myPath.newContour();
myPath.addPoint(10, 10);
myPath.addPoint(10, 20);
myPath.addPoint(20, 20);
myPath.addPoint(20, 10);
myPath.addPoint(10, 10);
myPath.makeShape();
path.nPts
Availability
Flash MX 2004.
Usage
path.nPts
Description
Read-only property; an integer representing the number of points in the path. A new path has 0 points.
Example
The following example uses the Output panel to show the number of points in the path referenced by the myPath
variable:
var myPath = fl.drawingLayer.newPath();
var numOfPoints = myPath.nPts;
fl.trace("Number of points in the path: " + numOfPoints);
// Displays: Number of points in the path: 0
Vue de la page 382
1 2 ... 378 379 380 381 382 383 384 385 386 387 388 ... 564 565

Commentaires sur ces manuels

Pas de commentaire