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.
- 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.
- 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 =).
- 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/trackbacks are closed for this post.


September 12th, 2005 at 2:12 pm
Reto is reported to have said:
Hi Paul
For the second point it would be nicer and more readable to let cfdump format the mxml by using <cfdump var="#xmlParse(form1)#">.
Best Regards,
Reto
September 12th, 2005 at 3:20 pm
Paul Robertson is reported to have said:
Thanks Reto, that’s a great tip!
Paul
November 22nd, 2005 at 4:19 pm
Freelancer is reported to have said:
Got it worked. thanks
January 18th, 2006 at 9:34 am
Dan is reported to have said:
My biggest gripe with flash forms is that it takes to load them - especiialy large ones. I guess this is because CF creates the mxml and swf on the fly.
I’ve been doing a lot of actionscripting based on the Flex API in CFForms to the point where CF is now more of a hinderance.
I’m attempting to speed up the forms with Flex Builder 2 alpha, and using the CF generated mxml as a basis to go from (as I’m not that up to speed with Flex), then adding the compiled swf from Flex to my html.
January 8th, 2008 at 2:22 am
Kody is reported to have said:
Helo :) 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.