Building multiple swf’s with Project Sprouts

For each additional swf you'll create a new task in your rakefile like this.

 
desc 'Menu App'
task :menu => "bin/MenuApp.swf"
mxmlc 'bin/MenuApp.swf' do |t|
  t.input                    = "src/MenuApp.as"
  t.debug                    = false
  t.optimize                 = true
  t.default_size             = '540 436'
  t.default_background_color = "0x000000"
  t.library_path     << "lib/corelib.swc"
  t.source_path      << "config/environments/production"
  t.define           = "CONFIG::production,false
  t.title            = "'My Project'"
  t.description      = 'My Menu App'
  t.link_report      = 'menu_report.xml'
end

After your task has been added it should now be listed when you run rake -T

 
rake -T
> rake menu                     # Menu App
 

Now run the task by it's name.

 
rake menu
 

You should see the mxmlc command execute. Note that your new swf will not be opened up like the rake debug task.

Comments are closed.