Here’s my idea of a simple MVC with the designer in mind. I originally wrote it in 2007 in AS2 with the help from a good friend Pete Rice. I revised it a bit and re-wrote it in AS3. Like I said it’s simple! It focuses on what designers know best, the timeline/MovieClip. It’s perfect for micro-sites or small RIA’s, its also ideal for single developers. It accomplishes what an MVC sets out to address “separation of concerns”, the traditional computer science idea of making a large program easier to manage by breaking it up into pieces that each manage their area of interest.
I created a real world example, and implemented swfobject, swfaddress and greensock’s TweenLite.
Each view has its own controller. There is also a stubbed out business layer for you to start implementing asset management, API proxies and XML parsing. It’s really easy to understand and its even easier to get up and running. Click on the image to see it in action.
The source fla is already set up with pre-loading of the entire .fla and its classes are loaded on frame 2.
You could literally take this source .fla and remove the colored backgrounds in each view including the nav view and add your own graphical assets, only caveat is to retain the instance name for state changes to work.
If you have any suggestions or improvements please let me know and I will add it to the “To Do List” or to the source itself.
AS3 Designer MVC (1361)