![]() | ![]() ![]() ![]() |
![]() | |
![]() | |
![]() |
A kind determines how a schema item for your component should be accessed at runtime. The number of kinds allowed is unlimited, and you can create additional custom kinds. Kinds are defined by XML files found in the Flash MX Professional 2004 Configuration/Kinds folder. The definition includes the following metadata:
The following kinds ship with Flash MX Professional 2004:
None The default kind. This kind is identical to the Data kind.
Data The schema item is a data structure, and the data field is stored within the data structure as specified by the field's schema location. This is the normal case. The data structure can be in either ActionScript or XML form.
Calculated This kind is used in conjunction with the DataSet component. It is used to define a calculated field (a virtual field whose value is calculated at runtime). There is no special processing when getting or setting the value of a calculated field. For example, in the DataSet component you might define three fields, called price
, quantity
, and totalPrice
. You would set the kind property for totalPrice
to Calculated
so that you can assign it a value at runtime, as in the sample code below:
function calculatedFunct(evt) { evt.target.totalPrice = (evt.target.price * evt.target.quantity); } ds.addEventListener('calcFields', calculatedFunct); }
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |