Friday, September 30, 2016

PureMVC Basic PureMVC with SWFAddress sample Flex

PureMVC Basic PureMVC with SWFAddress sample Flex



Whats now?

- just another lazy PureMVC sample!, skip this if you already known :)

OK, go on

- well i just start trying PureMVC, many peep said its good, so...its worth to try right? after googling i found some best practice for cave man like me here

  • http://hubflanger.com/building-a-flash-site-using-puremvc/
  • http://allflashwebsite.com/article/pure-mvc-swfaddress-template-integrating-swfaddress-with-puremvc

Why SWFAddress?

- why not? :P grab it here http://www.asual.com/swfaddress/
- and dont forget http://puremvc.org/component/option,com_wrapper/Itemid,144/

And then?

- i think hubflanger sample is cool and well describe but its not have SWFAddress yet and you need Flash IDE there, so lets mod it for practice yourself (also me ;P)

Result?

- 11kb file size for basic site navigation! minimalist again, lol nice!
- and now Flex peep can compile this hubflanger sample with Action Script Project, so you can happy with as3 there, but im not big fan of mxml, feel free to add it yourself there, then its just working with out beauty ;)

image

- view here :http://sleepydesign.com/labs/as3/PureMVC/PureMVCSWFAddress/
- source here : http://sleepydesign.com/labs/as3/PureMVC/PureMVCSWFAddress.zip


And then?

- only one thing that ive to mention is "public static var currentSection:String;" in "NavMediator", for call later by "SWFAddressProxy.setTargetURI(uriSegments:Array)" for check already focus section there to avoid recursive call, its maybe need "get/set" here instead of "public static var" cause "NavMediator.onNavButtonPressed" also sent notification this too, can be conflict later, but im feeling lazy now so just leave it there and lets you make decision to change it or not ;)

Next?

- i need Web Service rpc soap for next project somehow, so lets do it minimalist way, someone boring yet? lol not me....happy coding!


Go to link Download