
Schooner Technical Media
www.schoonertech.com
Macromedia ColdFusion MX 7 introduced a rich new interface format: Flash forms (<cfform format="flash" ... >). Through the cfform, cfformgroup, cfformitem, cfinput, cfgrid, and cfselect tags, ColdFusion developers can now create rich user interfaces which, amongst other powerful effects, modify their displayed data without a server-side roundtrip. In some contexts (using the cfgrid tag with the cfformitem or cfinput tags), you can use data binding to create these effects easily. However, in other contexts, a deeper understanding of event handlers, ActionScript, and the Flash Component API will open possibilities beyond simple data binding.
You'll learn more about Flash form event handlers, some ActionScript basics, key aspects of the Flash Component API, and a finally, a technique for bringing it all together using ColdFusion-generated ActionScript "injected" into event handlers, much as you might have used ColdFusion to generate JavaScript dynamically in the past. Using these techniques, you can achieve – amongst other things – one of web development’s more difficult feats : a select control to select control drill-down that (1) requires no roundtrip to the server, and (2) works in virtually all browsers because the solution uses Flash rather than fragile, browser-dependent JavaScript.
For those who want to use this interface effect immediately without learning the techniques in this article, SchoonerTech created a new custom tag, called <cf_TwoFlashSelectsRelated>, which I have included in the files accompanying this article. Please also notice that the demonstration files are commented and discuss aspects of ActionScript (“AS”) code.
To complete this tutorial you will need to install the following software and files:
<cf_TwoFlashSelectsRelated>Moderate to advanced ColdFusion development experience, including use of complex data structures (nested structures and arrays). JavaScript or CFScript experience is also helpful.
Fifteen years of technical training, writing, and presentation, coupled with geek credentials dating back to the Sinclair ZX81 (and later the Apple II+) and forward through the latest web application development technologies have made Leo a leading Macromedia Flash and ColdFusion instructor throughout the United States over the past seven years. Leo provides training internally and externally for Macromedia and its training partners, working as a principal with Schooner Technical Media in the U.S. Pacific Northwest. He also works regularly with Macromedia products–"practicing what he preaches"–through his web application and courseware development practice. You can reach Leo through Schooner Technical Media at www.schoonertech.com.