PureMVC Architects Lounge

Announcements and General Discussion => Getting Started => Topic started by: jgormley on November 04, 2008, 01:18:33



Title: how can I use PureMVC with flex but without mxml files?
Post by: jgormley on November 04, 2008, 01:18:33
I'm not a big fan of mixing mxml and AS and would like to create a flex app with only AS code.  How can I use PureMVC with an AS-only project?  Has anybody done this already or am I out of my mind for wanting to do this?

tia


Title: Re: how can I use PureMVC with flex but without mxml files?
Post by: Jason MacDonald on November 04, 2008, 02:47:21
I believe you need the first main MXML file but beyond that you could do it all using Code Behind (http://www.adobe.com/devnet/flex/quickstart/building_components_using_code_behind/). This is what I do. I'm still using MXML and just having it reference my base classes but you could it it this way without any MXML beyond your app mxml.


Title: Re: how can I use PureMVC with flex but without mxml files?
Post by: Tekool on November 04, 2008, 02:59:23
Just create a "New Actionscript Project" when you create your project in Flex Builder (or Eclipse with Flex plug-in) then you will have a default application class that inherits Sprite. You can use it as your main application class. No problem to use PureMVC with an ActionScript project only. Your views will have to be Actionscript only of course.