I used to use code behind when I first started with the alpha of Flex 2 but then switched to using helper classes instead. I found code behind simply added to the huge number of properties and methods that are already available in a UI component, plus it meant I could introduce an interface for the UI that I pass to the helper class - then I could reengineer the look without playing (too much) with the helper class.
Having said that, since Cairngorm came out for Flex 2 I've not used code behind or dedicated helper classes much at all. That's my take. Oliver Tupman On 17/01/07, Robert Chyko <[EMAIL PROTECTED]> wrote:
The .mxml files get translated into .as files of the same name. So basically you then have 2 index.as files... which obviously is going to give you problems. -----Original Message----- *From:* [email protected] [mailto:[EMAIL PROTECTED] *On Behalf Of *Danko Kozar *Sent:* Wednesday, January 17, 2007 4:50 AM *To:* [email protected] *Subject:* [flexcoders] Re: Code behind- do you use it? I use code-behind on pages with lot of code, since I don't want a mess: On index.mxml I have the script block containing th epath to the actionscript file (not as class): <mx:Script source="index.as" /> My question is: Why doesn't Flex Builder allow to name the .mxml and .as page using the same name? Does this happen only with files in subdirectories (?). Because the index.mxml <--> index.as (in root) works ok, but some other files cause me problems, so I have to add some extra characters in it's name, e.g.: MainView.mxml <--> MainView_.as Thanks.. Danko --- In [email protected] <flexcoders%40yahoogroups.com>, " ben.clinkinbeard" <[EMAIL PROTECTED]> wrote: > > I am undecided as to whether or not I want to use the code behind > method for my MXML files and figured I would see what others are > doing. I am currently just using Script blocks at the top of my files > to do event handling, initialization, etc but some of them are getting > pretty big. > > So what are others doing? No AS in your MXML files, no code behind, a > mixture of the two? > > Thanks, > Ben >

