beautypg.com

Element.setpersistentdata(), Element.settransformationpoint(), Primitive, or group, use – Adobe Extending Flash Professional CS5 User Manual

Page 216: Information, see

background image

194

EXTENDING FLASH PROFESSIONAL

Element object

Last updated 5/2/2011

element.setPersistentData()

Availability
Flash MX 2004.

Usage

element.setPersistentData(name, type, value)

Parameters

name

A string that specifies the name to associate with the data. This name is used to retrieve the data.

type

A string that defines the type of the data. The allowable values are

"integer"

,

"integerArray"

,

"double"

,

"doubleArray"

,

"string"

, and

"byteArray"

.

value

Specifies the value to associate with the object. The data type of value depends on the value of the type

parameter. The specified value should be appropriate to the data type specified by the type parameter.

Returns
Nothing.

Description
Method; stores data with an element. The data is available when the FLA file containing the element is reopened. Only
symbols and bitmaps support persistent data.

Example
See

element.getPersistentData()

.

element.setTransformationPoint()

Availability
Flash CS3 Professional.

Usage

element.setTransformationPoint(transformationPoint)

Parameters

transformationPoint

A point (for example,

{x:10, y:20}

, where

x

and

y

are floating-point numbers) that

specifies values for an element’s or group’s transformation point.

Shapes: transformationPoint is set relative to the document (0,0 is the upper-left corner of the Stage).

Symbols: transformationPoint is set relative to the symbol’s registration point (0,0 is located at the registration
point).

Text: transformationPoint is set relative to the text field (0,0 is the upper-left corner of the text field).

Bitmaps/videos: transformationPoint is set relative to the bitmap/video (0,0 is the upper-left corner of the bitmap
or video).

This manual is related to the following products: