Paul Robertson's words, punctuated

Thoughts on development, user-centered design, code, etc. by Paul Robertson

Advice for building and debugging ColdFusion Flash Forms, from one beginner to another

Part 2 of My first foray into ColdFusion Flash Forms.

Just a sort of hodge-podge of things that were useful to me.

  1. Write your event handler code using cfsavecontent, as I learned from Niklas at Prismix.

    Chances are you will want to run more than one line of code when you press a button, and although you can’t define an ActionScript function that gets called by the button you can do the next best thing, which is this technique.

  2. Give your form a name (e.g. <cfform type="flash" name="form1">) and cfdump the form to see the MXML generated by it (using <cfdump var="#form1#"> placed after the closing form tag).

    Being able to see the actual MXML output has given me tremendous insight into what is actually happening “in the guts” and consequently helped me figure out best ways or even possible ways to do things that would have been much more difficult otherwise. You even get to see the ActionScript source code for the functions that are automatically added by ColdFusion =).

  3. Take some time to learn ActionScript, and use the Flex reference materials to understand the Flex code. I have been doing stuff with Flash/ActionScript and some Flex for a while, so I found it pretty easy to pick up. In fact, for me personally my weak point with ColdFusion Flash Forms is the ColdFusion part. I know that may not be the case for you if you are reading this, but I’m sure we can all find something new to learn =).

Next: Creating “dynamic” form fields in ColdFusion Flash Forms – how and why

Comments