Adobe Extending Flash Professional CS5 Manuel d'utilisateur Page 92

  • 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 91
70
EXTENDING FLASH PROFESSIONAL
Document object
Last updated 5/2/2011
Description
Method; adds a new rectangle or rounded rectangle, fitting it into the specified bounds. This method performs the
same operation as the Rectangle tool. The method uses the document’s current default stroke and fill attributes and
adds the rectangle on the current frame and layer. If both bSuppressFill and bSuppressStroke are set to
true, the method
has no effect.
Example
The following example adds a new rectangle with no rounding on the corners within the specified coordinates; it is 100
pixels in width and in height:
fl.getDocumentDOM().addNewRectangle({left:0,top:0,right:100,bottom:100},0);
The following example adds a new rectangle with no rounding on the corners and without a fill; it is 100 pixels in width
and 200 in height:
fl.getDocumentDOM().addNewRectangle({left:10,top:10,right:110,bottom:210},0, true);
The following example adds a new rectangle with no rounding on the corners and without a stroke; it is 200 pixels in
width and 100 in height:
fl.getDocumentDOM().addNewRectangle({left:20,top:20,right:220,bottom:120},0, false, true);
See also
document.addNewPrimitiveRectangle()
document.addNewScene()
Availability
Flash MX 2004.
Usage
document.addNewScene([name])
Parameters
name Specifies the name of the scene. If you do not specify a name, a new scene name is generated.
Returns
A Boolean value: true if the scene is added successfully; false otherwise.
Description
Method; adds a new scene (Timeline object) as the next scene after the currently selected scene and makes the new
scene the currently selected scene. If the specified scene name already exists, the scene is not added and the method
returns an error.
Example
The following example adds a new scene named myScene after the current scene in the current document. The variable
success will be true when the new scene is created; false otherwise.
var success = fl.getDocumentDOM().addNewScene("myScene");
Vue de la page 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 564 565

Commentaires sur ces manuels

Pas de commentaire