beautypg.com

Document.addnewpublishprofile() – Adobe Extending Flash Professional CS5 User Manual

Page 90

background image

68

EXTENDING FLASH PROFESSIONAL

Document object

Last updated 5/2/2011

bSuppressStroke

A Boolean value that, if set to

true

, causes the method to create the rectangle without a stroke.

The default value is

false

. This parameter is optional.

Returns
Nothing.

Description
Method; adds a new rectangle primitive fitting into the specified bounds. This method performs the same operation
as the Rectangle Primitive tool. The rectangle primitive uses the document's current default stroke and fill attributes
and is added 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 rectangle primitives within the specified coordinates, with and without fill and stroke, and
with different amounts of roundness:

// Add a rectangle primitive with fill and stroke
fl.getDocumentDOM().addNewPrimitiveRectangle({left:0,top:0,right:100,bottom:100}, 0);
// Add a rectangle primitive without a fill
fl.getDocumentDOM().addNewPrimitiveRectangle({left:100,top:100,right:200,bottom:200}, 20,
true);
// Add a rectangle primitive without a stroke
fl.getDocumentDOM().addNewPrimitiveRectangle({left:200,top:200,right:300,bottom:300},
50,false,true);

See also

document.addNewRectangle()

document.addNewPublishProfile()

Availability
Flash MX 2004.

Usage

document.addNewPublishProfile([profileName])

Parameters

profileName

The unique name of the new profile. If you do not specify a name, a default name is provided. This

parameter is optional.

Returns
An integer that is the index of the new profile in the profiles list. Returns -1 if a new profile cannot be created.

Description
Method; adds a new publish profile and makes it the current one.

This manual is related to the following products: