CHAPTER 11
DataHolder component
(Flash Professional only)
The DataHolder component is a repository for data and a means of generating events when
that data has changed. Its main purpose is to hold data and act as a connector between other
components that use data binding.
Initially, the DataHolder component has a single bindable property named
more properties by using the Schema tab in the Component inspector. For more information
on using the Schema tab, see "Working with schemas in the Schema tab (Flash Professional
only)" in Using Flash.
You can assign any type of data to a DataHolder property, either by creating a binding
between the data and another property, or by using your own ActionScript code. Whenever
the value of that data changes, the DataHolder component emits an event whose name is the
same as the property, and any bindings associated with that property are executed.
In most cases, you do not use this component to build an application. It is needed only when
you cannot bind external data directly to another component and you do not want to use a
DataSet component. The DataHolder component is useful when you can't directly bind
components (such as connectors, user interface components, or DataSet components)
together. Below are some scenarios in which you might use a DataHolder component:
If a data value is generated by ActionScript, you might want to bind it to some other
components. In this case, you could have a DataHolder component that contains
properties that are bound as desired. Whenever new values are assigned to those properties
(by means of ActionScript, for example) those values are distributed to the data-bound
object.
11
. You can add
data
313
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?