The EndPoint objects,
var srcEndPoint = new mx.data.binding.EndPoint();
var destEndPoint = new mx.data.binding.EndPoint();
srcEndPoint.component = source_txt;
srcEndPoint.property = "text";
srcEndPoint.event = "focusOut";
destEndPoint.component = dest_txt;
destEndPoint.property = "text";
In English, the above code means "When the source text field loses focus, copy the value of its
property into the
text
You can also pass generic ActionScript objects to the Binding constructor, rather than passing
explicitly constructed EndPoint objects. The only requirement is that the objects define the
required EndPoint properties,
that shown above.
var srcEndPoint = {component:source_txt, property:"text"};
var destEndPoint = {component:dest_txt, property:"text"};
new mx.data.binding.Binding(srcEndPoint, destEndPoint);
To make this class available at runtime, you must include the data binding classes in your
FLA file.
For an overview of the classes in the mx.data.binding package, see
mx.data.binding package (Flash Professional only)" on page
Property summary for the EndPoint class
The following table lists the properties of the EndPoint class.
Method
EndPoint.component
EndPoint.constant
EndPoint.event
EndPoint.location
EndPoint.property
and
srcEndPoint
destEndPoint
property of the destination text field."
text
and
component
Description
A reference to a component instance.
A constant value.
The name of an event, or array of event names, that the component
emits when the data changes.
The location of a data field within the property of the component
instance.
The name of a property of the component instance specified by
EndPoint.component
, might be defined as follows:
. The following code is equivalent to
property
208.
.
EndPoint class (Flash Professional only)
"Classes in the
221
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers