User Guide
Data binding classes (Flash Professional only) 227
Description
Property; specifies the name of an event, or an array of event names, generated by the component
when data assigned to the bound property changes. When the event occurs, the binding executes.
The specified event only applies to components that are used as the source of a binding, or as the
destination of a two-way binding. For more information about creating two-way bindings, see
“Binding class (Flash Professional only)” on page 214.
Example
In this example, the text property of one TextInput (src_txt) component is bound to the same
property of another TextInput component (
dest_txt). The binding is executed when either the
focusOut or enter event is emitted by the src_txt component.
var source = {component:src_txt, property:"text", event:["focusOut",
"enter"]};
var dest = {component:myTextArea, property:"text"};
var newBind = new mx.data.binding.Binding(source, dest);
EndPoint.location
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
endPointObj.location
Description
Property; specifies the location of a data field within the property of the component instance.
There are four ways to specify a location: as a string that contains an XPath expression, as a string
that contains an ActionScript path, as an array of strings, or as an object.
XPath expressions can only be used when the data is an XML object. (See Example 1 below.) For
a list of supported XPath expressions, see “Adding bindings using path expressions” in Using Flash.
For XML and ActionScript objects, you can also specify a string that contains an ActionScript
path. An ActionScript path contains the names of fields separated by dots (for example,
"a.b.c").
You can also specify an array of strings as a location. Each string in the array “drills down” another
level of nesting. You can use this technique with both XML and ActionScript data. (See Example
2 below.) When used with ActionScript data, an array of strings is equivalent to use of an
ActionScript path; that is, the array
["a","b","c"] is equivalent to "a.b.c".