New Flash Form Feature #1
With the recent release ColdFusion 7.0.1 (Merrimack) I can finally tell you about some of the new Features. But first, if you haven't downloaded yet - do so!
You can download it here:
http://www.macromedia.com/support/coldfusion/downloads_updates.html#mx7
The first feature to tell you about is support for actionscript functions proper. Now you can create real Actionscript functions inside of your flash forms, no more <cfsavecontent> hacks. This should help to keep you flash forms a lot more manageable, it might even help that 32k limit (since you aren't copy/pasting as much code)..
Previously you might of done this:
<cfsavecontent var="as1">
alert('hi');
</cfsavecontent>
<cfinput type="Button" onClick="#as1#">
Now you can do this:
<cfform format="flash">
<cfformitem type="script">
function alertMsg(msg)
{
alert(msg);
}
</cfformitem>
<cfinput type="button" onClick="alertMsg(' this is a button click ')">
<cfinput type="button" onClick="alertMsg(' you clicked the wrong button'">
</cfform>


function redir(inStr){
alert('redir = ' + inStr);
document.URL = inStr;
alert('redirecting...');
}
The code on the button is:
The alerts in the code behave a little strange, I would expect the function to wait for a modal window response to the first alert, however what happens is that the first alert is shown, then the second alert on top of it. An accurate and valid URL is making it to the function (as shown using the first alert message), however the user is never redirected to the appropriate page... I've tried using document.URL, document.location, window.location (which never threw an exception, however the Flash form did not compile).
Any assistance or direction you can provide would be much appreciated.
Thanks,
Brian
function redir(inStr){
alert('redir = ' + inStr);
document.URL = inStr;
alert('redirecting...');
}
The code on the button is:
The alerts in the code behave a little strange, I would expect the function to wait for a modal window response to the first alert, however what happens is that the first alert is shown, then the second alert on top of it. An accurate and valid URL is making it to the function (as shown using the first alert message), however the user is never redirected to the appropriate page... I've tried using document.URL, document.location, window.location (which never threw an exception, however the Flash form did not compile).
Any assistance or direction you can provide would be much appreciated.
Thanks,
Brian
Sorry for the double-post, I accidentally F5'd it.
-Brian