09Dec flashMVC: New Utility ActionBinder!
624 views
I just update the SVN (svn.jadbox.com/public/) source for flashMVC with a MXML component tool I made for the cases that I was working with Flex. It’s located in com/jadbox/flashMVC/flex/ActionBinder.as, and it helps automate the view (aka MXML) portion of your application to communicate with your SuperModel. It will monitor the status of a particular action on the model, and allow the user to easily perform view updates or to run the action itself. This will help further reduce the amount of work you will have to do in Script tags (if not completely remove the need for one in the MXML).
<flashMVC:ActionBinder superModel="{mySuperModel}"
action="{mySuperModel.LOGIN}"
id="LoginBinder"
actionComplete="{trace('Login action completed')}"
actionEnable="{trace('action enabled')}"
actionDisable="{trace('action disabled')}"
actionPerforming="{trace('working')}"
actionStoppedPerforming="{trace('stopped working')}" />
// You can also do the action from the wrapper:
myActionBinder.perform(...args);
LoginBinder.perform(username.text, password.test); // for example
// Can use this property to
// enable or disable the action as well:
myActionBinder.actionEnabled=false;
You can find a great example of this in my SVN under the path:
/flex projects/flashMVC examples/actionBinderExample/
You will just be sure to link the flashMVC framework from the Flex project settings to compile.
Asdocs have been updated with the ActionBinder’s API. For more information about nimble flashMVC framework, go the flashMVC tab at the top.
Next on my list of features for flashMVC is the application “replayability from imported xml log”. This will be really useful to utilize in Flash or Flex development!

