The following example illustrates how you make an existing component property bindable by
adding the component property to the component's schema. In the example, you create an
application that uses a CheckBox component to indicate whether a TextInput component is
editable. Because the TextInput component's schema does not initially contain the
property, you add the
component.
To add a component property to a schema to make the property bindable:
1.
Add a TextInput component and a CheckBox component to your application, and give
them instance names.
2.
Select the TextInput component, and click the Schema tab on the Component inspector.
3.
Click the Add a Component Property (+) button at the upper left of the Schema tab to add
a component property.
4.
In the Schema Attributes pane (the bottom pane of the Schema tab), enter editable for the
field name value and select Boolean for the data type value.
5.
Click the Bindings tab, and click the Add Binding (+) button to add a binding.
6.
In the Add Binding dialog box, select the
7.
In the Binding Attributes pane at the bottom of the Bindings tab, click the Bound To item
under Name, and click the magnifying glass icon across from the Bound To item under
Value.
8.
In the Bound To dialog box, select the CheckBox component under Component Path, and
click OK.
9.
Select the Checkbox component on the Stage, and click the Parameters tab in the
Component inspector.
10.
Select Control > Test Movie. To test the functionality, type a value into the TextInput
component and then deselect the CheckBox component. You should now be unable to
enter text into the TextInput component.
property to the schema to bind it to the CheckBox
editable
property, and click OK.
editable
Data binding (Flash Professional only)
editable
399
Need help?
Do you have a question about the FLASH 8-USING FLASH and is the answer not in the manual?