User Guide
224 Chapter 6: Components Dictionary
Each message you pass to validationError() is available in the messages property of the event
object that was passed to the
invalid event handler.
Example
See the Example section for CustomValidator.validate().
EndPoint class (Flash Professional only)
ActionScript Class Name mx.data.binding.EndPoint
The EndPoint class defines the source or destination of a binding. EndPoint objects define a
constant value, component property, or particular field of a component property, from which you
can get data, or to which you can assign data. They can also define an event, or list of events, that
a Binding object listens for; when the specified event occurs, the binding executes.
When you create a new binding with the Binding class constructor, you pass it two EndPoint
objects: one for the source and one for the destination.
new mx.data.binding.Binding(srcEndPoint, destEndPoint);
The EndPoint objects, srcEndPoint and destEndPoint, might be defined as follows:
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
text property into the text property of the destination text field.”
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,
component and property. The following code is equivalent to that
shown above.
var srcEndPoint = {component:source_txt, property:"text"};
var destEndPoint = {component:dest_txt, property:"text"};
new mx.data.binding.Binding(srcEndPoint, destEndPoint);
Note: To make this class available at runtime, you must include the data binding classes in your FLA
document.
For an overview of the classes in the mx.data.binding package, see “Classes in the mx.data.binding
package (Flash Professional only)” on page 213.