beautypg.com

Document.getdatafromdocument(), Document.getelementproperty() – Adobe Extending Flash Professional CS5 User Manual

Page 127

background image

105

EXTENDING FLASH PROFESSIONAL

Document object

Last updated 5/2/2011

var stroke = fl.getDocumentDOM().getCustomStroke("selection");

stroke.thickness = 2;

fl.getDocumentDOM().setCustomStroke(stroke);

The following example returns the current stroke settings of the Tools panel and Property inspector and sets the stroke
color to red:

var stroke = fl.getDocumentDOM().getCustomStroke("toolbar");

stroke.color = "#FF0000";

fl.getDocumentDOM().setCustomStroke(stroke);

See also

document.setCustomStroke()

document.getDataFromDocument()

Availability
Flash MX 2004.

Usage

document.getDataFromDocument(name)

Parameters

name

A string that specifies the name of the data to return.

Returns
The specified data.

Description
Method; retrieves the value of the specified data. The type returned depends on the type of data that was stored.

Example
The following example adds an integer value of 12 to the current document and uses this method to display the value
in the Output panel:

fl.getDocumentDOM().addDataToDocument("myData", "integer", 12);

fl.trace(fl.getDocumentDOM().getDataFromDocument("myData"));

See also

document.addDataToDocument()

,

document.documentHasData()

,

document.removeDataFromDocument()

document.getElementProperty()

Availability
Flash MX 2004.

This manual is related to the following products: