Learning ActionScript 2.0 in Adobe Flash |
|
|
|
| Creating Interaction with ActionScript > Creating runtime data bindings using ActionScript | |||
If you use components to create applications, it's often necessary to add bindings between those components so that you can interact with data or have components interact with each other. Interaction between components is necessary for creating usable forms or interfaces that your users can interact with. You can use the Bindings tab in the Component inspector to add bindings between components on the Stage.
For more information on using the Bindings tab, see Using Flash. You can also find additional information in the following online articles: Building a Tip of the day Application (Part 2), Data Binding in Macromedia Flash MX Professional 2004, and Building a Google Search Application with Macromedia Flash MX Professional.
You can use ActionScript instead of the Bindings tab to create bindings between components. Adding code is often faster and more efficient than relying on the authoring environment. Using ActionScript to create bindings is necessary when you use code to add components to an application. You can choose to use the createClassObject() method to add components onto the Stage dynamically; however, you couldn't use the Bindings tab to create a binding because the components don't exist until runtime. Using ActionScript to add data binding is often called runtime data binding.
For more information, see the following topics:
|
|
|
|