0 Replies Latest reply on Sep 14, 2009 1:52 AM by oli4dejonge

    Why do we put Actionscript on top in .mxml files?

    oli4dejonge

      Hi,

       

      Developing projects in Flex I wondered why Flex's default code structure and standard for .mxml components is to put the <mx:Script> or now <fx:Script> above all other <mx:components> or <s:components>. Recently I decided in a project to put the <mx:components> on top of the actionscript <mx:Script> tag, so when I open a file I see it's structure first and then can dive in the code. I had to refactore hundreds of files but it was worth the effort, because I don't have to scroll down anymore to know what a component is doing and I can quickly control click to another component I realy need to edit. In Flash Catalyst I see that default code is again on top of the components. I think it is unpractically.

       

      Anyone has experience with this?

      Thank you!

       

      Olivier de Jonge