User Guide
Using the Accordion component (Flash Professional only) 39
8. In the Property inspector, do the following:
■ Enter the instance name my_acc.
■ For the childSymbols property, enter AddressForm, AddressForm, and
CheckoutForm.
These strings specify the names of the movie clips used to create the accordion’s
children.
■ For the childNames property, enter shippingAddress, billingAddress, and checkout.
These strings are the ActionScript names of the accordion’s children.
■ For the childLabels property, enter Shipping Address, Billing Address, and
Checkout.
These strings are the text labels on the accordion headers.
■ For the childIcons property, enter AddressIcon, AddressIcon, and CheckoutIcon.
These strings specify the linkage identifiers of the movie clip symbols that are used as
the icons on the accordion headers. You must create these movie clip symbols if you
want icons in the headers.
9. Select Control > Test Movie.
To use ActionScript to add children to an Accordion component:
1. Select File > New and create a Flash document.
2. Drag an Accordion component from the Components panel to the Stage.
3. In the Property inspector, enter the instance name my_acc.
4. Drag a TextInput component to the library.
This adds the component to the library so that you can dynamically instantiate it in step
6.
5. In the Actions panel in Frame 1 of the timeline, enter the following (this code calls the
createChild() method to create its child views.):
import mx.core.View;
// Create child panels for each form to be displayed in my_acc object.
my_acc.createChild(View, "shippingAddress", {label: "Shipping
Address"});
my_acc.createChild(View, "billingAddress", {label: "Billing Address"});
my_acc.createChild(View, "payment", {label: "Payment"});
NOTE
The first two children are instances of the same movie clip, because the shipping
address form and the billing address form are identical.