DataHolder.data
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
dataHolder.data
Description
Property; the default item in a DataHolder object's schema. This property is not a
"permanent" member of the DataHolder component. Rather, it is the default bindable
property for each instance of the component. You can add your own bindable properties, or
delete the default
data
For more information on using the Schema tab, see "Working with schemas in the Schema
tab (Flash Professional only)" in Using Flash.
Example
For a step-by-step example of using this component, see
DataHolder component (Flash Professional only)" on page
The following code shows a simple example of how to populate the DataHolder component
with data that is a variable. To test the application, you enter a value into the text input field
and click the
addDate_btn
Click the
dumpDataHolder_btn
// Drag two Button components onto the Stage (addDate_btn and
dumpDataHolder_btn), a TextInput (myDate_txt) and a DataHolder
(myDataHolder). Add the following ActionScript to Frame 1:
var dhListener:Object = new Object();
dhListener.click = function() {
trace("dumping DataHolder");
trace("
" + myDataHolder.myDate);
trace("");
};
var dateListener:Object = new Object();
dateListener.click = function() {
myDataHolder.myDate = myDate_txt.text;
trace("added value");
};
this.dumpDataHolder_btn.addEventListener("click", dhListener);
this.addDate_btn.addEventListener("click", dateListener);
316
DataHolder component (Flash Professional only)
property, by using the Schema tab in the Component inspector.
instance, which adds the value to the DataHolder component.
instance to trace the contents of the DataHolder component.
"Creating an application with the
314.
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers