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: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Danko Kozar
        Sent: Wednesday, January 17, 2007 4:50 AM
        To: flexcoders@yahoogroups.com
        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 flexcoders@yahoogroups.com
<mailto: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
        >
        
        

         

Reply via email to