Output filename in Flash Builder

后端 未结 4 1317
盖世英雄少女心
盖世英雄少女心 2021-01-12 10:55

I am trying Flash Builder for the first time and I\'m stuck in a simple task. How can I change the output filename?

By default, Flash Builder gives the SWF the same

4条回答
  •  终归单人心
    2021-01-12 11:33

    Yeah, the "-output" compiler param won't work if you're compiling in Flash Builder, as you've no doubt realized. It's by design, believe or not (not sure why).

    The solution that has worked for me has been to use a bit of indirection:

    1. use mxmlc to compile to ApplicationClass.swf
    2. command line copy ApplicationClass.swf to YourCustomSwf.swf
    3. command line run YourCustomSwf.swf

    You can do this with either a simple (platform-dependent) build script, or with Flex Ant Tasks. I highly recommend the latter; it's easy to setup, integrates well with Flash Builder, and (as a mostly platform-independent solution) will work in a multi-team multi-OS environment. Here are the above steps as ant tasks that will perform the magic for you:

        
        
    
        
            
                
                
                
                
            
        
    
        
            
        
    
        
            
                
            
        
    
    
    

    you need only define all ${VARIABLES} I've listed in "your.properties.file", like so:

    FLASH_PLAYER_DEBUG=/Applications/Adobe Flash CS5/Players/Debug/Flash Player Debugger.app/Contents/MacOS/Flash Player Debugger
    IS_DEBUG=true
    

    (et cetera)

    And anyway - what's in a name? A program by any other name, would be as awesome... B-)

提交回复
热议问题