Now that we have our new node editor ready to go in Flash, we are ready to add new data to our Drupal web site using this Flash application. We will start by opening up our
main.as file, where we will hook up all the business logic that will govern our new node submit form.
Because we added our tabs to our node editor, we will need to create the business logic that will hide and show certain elements when these tabs are clicked. But first, we will need to add event handlers to each tab so that we can handle each state (normal, hover, and selected). We can add the most flexibility by iterating through all of the children within the tabs movie clip and then adding all the handlers we need on all tabs within our tabs movie clip. By doing this, we can easily add new tabs without having to modify our
main.as file every time.
// The current user. var user:Object = null; // Instantiate our tabs. var i:Number = tabs.numChildren; while(...