Class: Sprout::MXMLCTask

Inherits:
ToolTask
  • Object
show all
Defined in:
lib/sprout/tasks/mxmlc_task.rb,
lib/sprout/tasks/mxmlc_documentation.rb

Overview

The MXMLC task provides a rake front end to the Flex MXMLC command line compiler. This task is integrated with the LibraryTask so that if any dependencies are library tasks, they will be automatically added to the library_path or source_path depending on whether they provide a swc or sources.

The entire MXMLC advanced interface has been provided here. All parameter names should be identical to what is available on the regular compiler except dashes have been replaced by underscores.

The following example can be pasted in a file named ‘rakefile.rb’ which should be placed in the same folder as an ActionScript 3.0 class named ‘SomeProject.as’ that extends flash.display.Sprite.

# Create a remote library dependency on the corelib swc.
library :corelib

# Alias the compilation task with one that is easier to type
task :compile => 'SomeProject.swf'

# Create an MXMLCTask named for the output file that it creates. This task depends on the
# corelib library and will automatically add the corelib.swc to it's library_path
mxmlc 'SomeProject.swf' => :corelib do |t|
  t.input                     = 'SomeProject.as'
  t.default_size              = '800 600'
  t.default_background_color  = "#FFFFFF"
end

Note: Be sure to check out the features of the ToolTask to learn more about gem_version and preprocessor

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#use_fcshObject

Use a running instance of the FCSH command shell to speed up compilation. You need to run ‘rake fcsh:start’ in another terminal before turning on this flag and compiling.



68
69
70
# File 'lib/sprout/tasks/mxmlc_task.rb', line 68

def use_fcsh
  @use_fcsh
end

Instance Method Details

#accessible=(boolean) ⇒ Object

Enables accessibility features when compiling the Flex application or SWC file. The default value is false.



4
5
6
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 4

def accessible=(boolean)
  @accessible = boolean
end

#actionscript_file_encoding=(string) ⇒ Object

Sets the file encoding for ActionScript files. For more information see: livedocs.adobe.com/flex/2/docs/00001503.html#149244



9
10
11
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 9

def actionscript_file_encoding=(string)
  @actionscript_file_encoding = string
end

#allow_source_path_overlap=(boolean) ⇒ Object

Checks if a source-path entry is a subdirectory of another source-path entry. It helps make the package names of MXML components unambiguous. This is an advanced option.



14
15
16
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 14

def allow_source_path_overlap=(boolean)
  @allow_source_path_overlap = boolean
end

#as3=(boolean) ⇒ Object

Use the ActionScript 3.0 class-based object model for greater performance and better error reporting. In the class-based object model, most built-in functions are implemented as fixed methods of classes.

The default value is true. If you set this value to false, you must set the es option to true.

This is an advanced option.



23
24
25
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 23

def as3=(boolean)
  @as3 = boolean
end

#benchmark=(boolean) ⇒ Object

Prints detailed compile times to the standard output. The default value is true.



28
29
30
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 28

def benchmark=(boolean)
  @benchmark = boolean
end

#context_root=(path) ⇒ Object

Sets the value of the Sprout::MXMLCTask.contextcontext.root token in channel definitions in the flex-services.xml file. If you do not specify the value of this option, Flex uses an empty string.

For more information on using the Sprout::MXMLCTask.contextcontext.root token, see livedocs.adobe.com/flex/2/docs/00001446.html#205687.



35
36
37
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 35

def context_root=(path)
  @context_root = path
end

#contributor=(string) ⇒ Object

Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (livedocs.adobe.com/flex/2/docs/00001502.html#145380).



40
41
42
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 40

def contributor=(string)
  @contributor = string
end

#creator=(string) ⇒ Object

Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. (livedocs.adobe.com/flex/2/docs/00001502.html#145380)



45
46
47
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 45

def creator=(string)
  @creator = string
end

#date=(string) ⇒ Object

Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. (livedocs.adobe.com/flex/2/docs/00001502.html#145380)



50
51
52
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 50

def date=(string)
  @date = string
end

#debug=(boolean) ⇒ Object

Generates a debug SWF file. This file includes line numbers and filenames of all the source files. When a run-time error occurs, the stacktrace shows these line numbers and filenames. This information is also used by the command-line debugger and the Flex Builder debugger. Enabling the debug option generates larger SWF files.

For the mxmlc compiler, the default value is false. For the compc compiler, the default value is true.

For SWC files generated with the compc compiler, set this value to true, unless the target SWC file is an RSL. In that case, set the debug option to false.

For information about the command-line debugger, see Using the Command-Line Debugger (livedocs.adobe.com/flex/2/docs/00001540.html#181846).

Flex also uses the verbose-stacktraces setting to determine whether line numbers are added to the stacktrace.



63
64
65
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 63

def debug=(boolean)
  @debug = boolean
end

#debug_password=(string) ⇒ Object

Lets you engage in remote debugging sessions with the Flash IDE. This is an advanced option.



68
69
70
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 68

def debug_password=(string)
  @debug_password = string
end

#default_background_color=(string) ⇒ Object

Sets the application’s background color. You use the 0x notation to set the color, as the following example shows:

-default-background-color=0xCCCCFF

The default value is null. The default background of a Flex application is an image of a gray gradient. You must override this image for the value of the default-background-color option to be visible. For more information, see Editing application settings (livedocs.adobe.com/flex/2/docs/00001504.html#138781).

This is an advanced option.



79
80
81
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 79

def default_background_color=(string)
  @default_background_color = string
end

#default_css_url=(url) ⇒ Object

Defines the location of the default style sheet. Setting this option overrides the implicit use of the defaults.css style sheet in the framework.swc file.

For more information on the defaults.css file, see Using Styles and Themes (livedocs.adobe.com/flex/2/docs/00000751.html#241755) in Flex 2 Developer’s Guide.

This is an advanced option.



116
117
118
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 116

def default_css_url=(url)
  @default_css_url = url
end

#default_frame_rate=(number) ⇒ Object

Sets the application’s frame rate. The default value is 24. This is an advanced option.



84
85
86
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 84

def default_frame_rate=(number)
  @default_frame_rate = number
end

#default_script_limits=(string) ⇒ Object

Defines the application’s script execution limits. The max-recursion-depth value specifies the maximum depth of Adobe Flash Player call stack before Flash Player stops. This is essentially the stack overflow limit. The default value is 1000.

The max-execution-time value specifies the maximum duration, in seconds, that an ActionScript event handler can execute before Flash Player assumes that it is hung, and aborts it. The default value is 60 seconds. You cannot set this value above 60 seconds.

Example:

# 900 is new max-recursion-depth # 20 is new max-execution-time t.default_script_limits = ‘900 20’

You can override these settings in the application.

This is an advanced option.



102
103
104
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 102

def default_script_limits=(string)
  @default_script_limits = string
end

#default_size=(string) ⇒ Object

Defines the default application size, in pixels for example: default_size = ‘950 550’. This is an advanced option.



107
108
109
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 107

def default_size=(string)
  @default_size = string
end

#defineObject

:nodoc:



718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
# File 'lib/sprout/tasks/mxmlc_task.rb', line 718

def define # :nodoc:
  super

  if(!output)
    if(name.match(/.swf/) || name.match(/swc/))
      self.output = name
    end
  end
  
  if(input && !input.match(/.css/) && File.exists?(input))
    source_path << File.dirname(input)
  end
  
  if(include_path)
    include_path.each do |path|
      process_include_path(path) if(File.directory?(path))
    end
  end
  
  self.include_path = []
  
  if(link_report)
    CLEAN.add(link_report)
  end
  
  source_path.uniq!
  param_hash['source_path'].value = clean_nested_source_paths(source_path)
  
  CLEAN.add(output)
  if(incremental)
    CLEAN.add(FileList['**/**/*.cache'])
  end

  self
end

#define_conditional=(strings) ⇒ Object

This parameter is normally called ‘define’ but thanks to scoping issues with Sprouts and Rake, we needed to rename it and chose: ‘define_conditional’.

Define a global AS3 conditional compilation definition, e.g. -define=CONFIG::debugging,true or -define+=CONFIG::debugging,true (to append to existing definitions in flex-config.xml) (advanced, repeatable)



123
124
125
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 123

def define_conditional=(strings)
  @define_conditional = strings
end

#description=(string) ⇒ Object

Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (livedocs.adobe.com/flex/2/docs/00001502.html#145380).



128
129
130
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 128

def description=(string)
  @description = string
end

#dump_config=(file) ⇒ Object

Outputs the compiler options in the flex-config.xml file to the target path; for example:

mxmlc -dump-config myapp-config.xml

This is an advanced option.



137
138
139
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 137

def dump_config=(file)
  @dump_config = file
end

#es=(boolean) ⇒ Object

Use the ECMAScript edition 3 prototype-based object model to allow dynamic overriding of prototype properties. In the prototype-based object model, built-in functions are implemented as dynamic properties of prototype objects.

You can set the strict option to true when you use this model, but it might result in compiler errors for references to dynamic properties.

The default value is false. If you set this option to true, you must set the es3 option to false.

This is an advanced option.



148
149
150
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 148

def es=(boolean)
  @es = boolean
end

#external_library_path=(files) ⇒ Object

Specifies a list of SWC files or directories to exclude from linking when compiling a SWF file. This option provides compile-time link checking for external components that are dynamically linked.

For more information about dynamic linking, see About linking (livedocs.adobe.com/flex/2/docs/00001521.html#205852).

You can use the += operator to append the new SWC file to the list of external libraries.

This parameter has been aliased as el.



170
171
172
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 170

def external_library_path=(files)
  @external_library_path = files
end

#externs=(symbols) ⇒ Object

Sets a list of symbols to exclude from linking when compiling a SWF file.

This option provides compile-time link checking for external references that are dynamically linked.

For more information about dynamic linking, see About linking (livedocs.adobe.com/flex/2/docs/00001521.html#205852).

This is an advanced option.



159
160
161
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 159

def externs=(symbols)
  @externs = symbols
end

#file_specs=(files) ⇒ Object

Specifies source files to compile. This is the default option for the mxmlc compiler.



175
176
177
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 175

def file_specs=(files)
  @file_specs = files
end

#fonts_languages_language_range=(string) ⇒ Object

Specifies the range of Unicode settings for that language. For more information, see Using Styles and Themes (livedocs.adobe.com/flex/2/docs/00000751.html#241755) in Flex 2 Developer’s Guide.

This is an advanced option.



182
183
184
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 182

def fonts_languages_language_range=(string)
  @fonts_languages_language_range = string
end

#fonts_managers=(symbols) ⇒ Object

Defines the font manager. The default is flash.fonts.JREFontManager. You can also use the flash.fonts.BatikFontManager. For more information, see Using Styles and Themes in Flex 2 Developer’s Guide (livedocs.adobe.com/flex/2/docs/00000751.html#241755).

This is an advanced option.



189
190
191
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 189

def fonts_managers=(symbols)
  @fonts_managers = symbols
end

#fonts_max_cached_fonts=(number) ⇒ Object

Sets the maximum number of fonts to keep in the server cache. For more information, see Caching fonts and glyphs (livedocs.adobe.com/flex/2/docs/00001469.html#208457).

This is an advanced option.



196
197
198
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 196

def fonts_max_cached_fonts=(number)
  @fonts_max_cached_fonts = number
end

#fonts_max_glyphs_per_face=(number) ⇒ Object

Sets the maximum number of character glyph-outlines to keep in the server cache for each font face. For more information, see Caching fonts and glyphs (livedocs.adobe.com/flex/2/docs/00001469.html#208457).

This is an advanced option.



203
204
205
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 203

def fonts_max_glyphs_per_face=(number)
  @fonts_max_glyphs_per_face = number
end

#frames_frame=(string) ⇒ Object

Specifies a SWF file frame label with a sequence of class names that are linked onto the frame.

For example: frames_frame = ‘someLabel MyProject OtherProject FoodProject’

This is an advanced option.



212
213
214
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 212

def frames_frame=(string)
  @frames_frame = string
end

#generate_frame_loader=(boolean) ⇒ Object

Toggles the generation of an IFlexBootstrap-derived loader class.

This is an advanced option.



219
220
221
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 219

def generate_frame_loader=(boolean)
  @generate_frame_loader = boolean
end

#headless_server=(boolean) ⇒ Object

Enables the headless implementation of the Flex compiler. This sets the following:

System.setProperty(‘java.awt.headless’, ‘true’)

The headless setting (java.awt.headless=true) is required to use fonts and SVG on UNIX systems without X Windows.

This is an advanced option.



230
231
232
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 230

def headless_server=(boolean)
  @headless_server = boolean
end

#include_libraries=(files) ⇒ Object

Links all classes inside a SWC file to the resulting application SWF file, regardless of whether or not they are used.

Contrast this option with the library-path option that includes only those classes that are referenced at compile time.

To link one or more classes whether or not they are used and not an entire SWC file, use the includes option.

This option is commonly used to specify resource bundles.



241
242
243
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 241

def include_libraries=(files)
  @include_libraries = files
end

#include_path=(paths) ⇒ Object

Define one or more directory paths for include processing. For each path that is provided, all .as and .mxml files found forward of that path will be included in the SWF regardless of whether they are imported or not.



254
255
256
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 254

def include_path=(paths)
  @include_path = paths
end

#includes=(symbols) ⇒ Object

Links one or more classes to the resulting application SWF file, whether or not those classes are required at compile time.

To link an entire SWC file rather than individual classes, use the include-libraries option.



248
249
250
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 248

def includes=(symbols)
  @includes = symbols
end

#incremental=(boolean) ⇒ Object

Enables incremental compilation. For more information, see About incremental compilation (livedocs.adobe.com/flex/2/docs/00001506.html#153980).

This option is true by default for the Flex Builder application compiler. For the command-line compiler, the default is false. The web-tier compiler does not support incremental compilation.



261
262
263
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 261

def incremental=(boolean)
  @incremental = boolean
end

#initialize_taskObject



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
# File 'lib/sprout/tasks/mxmlc_task.rb', line 72

def initialize_task
  @default_gem_name = 'sprout-flex3sdk-tool'
  @default_gem_path = 'bin/mxmlc'
  
  add_param(:accessible, :boolean) do |p|
    p.hidden_value = true
    p.description = "Enables accessibility features when compiling the Flex application or SWC file. The default value is false."
  end
  
  add_param(:actionscript_file_encoding, :string) do |p|
    p.description = "Sets the file encoding for ActionScript files. For more information see: http://livedocs.adobe.com/flex/2/docs/00001503.html#149244"
  end
  
  add_param(:allow_source_path_overlap, :boolean) do |p|
    p.hidden_value = true
    p.description = "Checks if a source-path entry is a subdirectory of another source-path entry. It helps make the package names of MXML components unambiguous. This is an advanced option."
  end
  
  # multiline strings won't work in stupid aptana!
  add_param(:as3, :boolean) do |p|
    p.value = true
    p.show_on_false = true
    p.description =<<EOF
Use the ActionScript 3.0 class-based object model for greater performance and better error reporting. In the class-based object model, most built-in functions are implemented as fixed methods of classes.

The default value is true. If you set this value to false, you must set the es option to true.

This is an advanced option.
EOF
  end
  
  add_param(:benchmark, :boolean) do |p|
    p.value = true
    p.show_on_false = true
    p.description = "Prints detailed compile times to the standard output. The default value is true."
  end
  
  add_param(:context_root, :path) do |p|
    p.description =<<EOF
Sets the value of the {context.root} token in channel definitions in the flex-services.xml file. If you do not specify the value of this option, Flex uses an empty string.
    
For more information on using the {context.root} token, see http://livedocs.adobe.com/flex/2/docs/00001446.html#205687.
EOF
  end
  
  add_param(:contributor, :string) do |p|
    p.description = "Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)."
  end
  
  add_param(:creator, :string) do |p|
    p.description = "Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)"
  end
  
  add_param(:date, :string) do |p|
    p.description = "Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files. (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)"
  end
  
  add_param(:debug, :boolean) do |p|
    p.hidden_value = true
    p.description =<<EOF
Generates a debug SWF file. This file includes line numbers and filenames of all the source files. When a run-time error occurs, the stacktrace shows these line numbers and filenames. This information is also used by the command-line debugger and the Flex Builder debugger. Enabling the debug option generates larger SWF files.

For the mxmlc compiler, the default value is false. For the compc compiler, the default value is true.

For SWC files generated with the compc compiler, set this value to true, unless the target SWC file is an RSL. In that case, set the debug option to false.

For information about the command-line debugger, see Using the Command-Line Debugger (http://livedocs.adobe.com/flex/2/docs/00001540.html#181846).

Flex also uses the verbose-stacktraces setting to determine whether line numbers are added to the stacktrace.
EOF
  end
  
  add_param(:debug_password, :string) do |p|
    p.description = "Lets you engage in remote debugging sessions with the Flash IDE. This is an advanced option."
  end
  
  add_param(:default_background_color, :string) do |p|
    p.description =<<EOF
Sets the application's background color. You use the 0x notation to set the color, as the following example shows:

-default-background-color=0xCCCCFF

The default value is null. The default background of a Flex application is an image of a gray gradient. You must override this image for the value of the default-background-color option to be visible. For more information, see Editing application settings (http://livedocs.adobe.com/flex/2/docs/00001504.html#138781).

This is an advanced option.
EOF
  end
  
  add_param(:default_frame_rate, :number) do |p|
    p.description = "Sets the application's frame rate. The default value is 24. This is an advanced option."
  end
  
  add_param(:default_script_limits, :string) do |p|
    p.description =<<EOF 
    Defines the application's script execution limits.
The max-recursion-depth value specifies the maximum depth of Adobe Flash Player call stack before Flash Player stops. This is essentially the stack overflow limit. The default value is 1000.

The max-execution-time value specifies the maximum duration, in seconds, that an ActionScript event handler can execute before Flash Player assumes that it is hung, and aborts it. The default value is 60 seconds. You cannot set this value above 60 seconds.

Example:

# 900 is new max-recursion-depth
# 20 is new max-execution-time
t.default_script_limits = '900 20'

You can override these settings in the application.

This is an advanced option.
EOF

end
  
  add_param(:default_size, :string) do |p|
    p.delimiter = ' '
    p.description = "Defines the default application size, in pixels for example: default_size = '950 550'. This is an advanced option."
  end
  
  add_param(:default_css_url, :url) do |p|
    p.description =<<EOF
Defines the location of the default style sheet. Setting this option overrides the implicit use of the defaults.css style sheet in the framework.swc file.

For more information on the defaults.css file, see Using Styles and Themes (http://livedocs.adobe.com/flex/2/docs/00000751.html#241755) in Flex 2 Developer's Guide.

This is an advanced option.
EOF
  end

  add_param(:define_conditional, :strings) do |p|
    p.shell_name = "-define"
    p.description =<<EOF
This parameter is normally called 'define' but thanks to scoping issues with Sprouts and Rake, we needed to rename it and chose: 'define_conditional'.

Define a global AS3 conditional compilation definition, e.g. -define=CONFIG::debugging,true or -define+=CONFIG::debugging,true (to append to existing definitions in flex-config.xml)  (advanced, repeatable)
EOF
  end
  
  add_param(:description, :string) do |p|
    p.description = "Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)."
  end
  
  add_param(:dump_config, :file) do |p|
    p.description =<<EOF
Outputs the compiler options in the flex-config.xml file to the target path; for example:

mxmlc -dump-config myapp-config.xml

This is an advanced option.
EOF
  end
  
  # TODO: Add parameter interactions to ensure
  # valid state?
  add_param(:es, :boolean) do |p|
    p.description =<<EOF
Use the ECMAScript edition 3 prototype-based object model to allow dynamic overriding of prototype properties. In the prototype-based object model, built-in functions are implemented as dynamic properties of prototype objects.

You can set the strict option to true when you use this model, but it might result in compiler errors for references to dynamic properties.

The default value is false. If you set this option to true, you must set the es3 option to false.

This is an advanced option.
EOF
  end
  
  add_param(:externs, :symbols) do |p|
    p.description =<<EOF
Sets a list of symbols to exclude from linking when compiling a SWF file.

This option provides compile-time link checking for external references that are dynamically linked.

For more information about dynamic linking, see About linking (http://livedocs.adobe.com/flex/2/docs/00001521.html#205852).

This is an advanced option.
EOF
  end
  
  add_param(:external_library_path, :files) do |p|
    p.description =<<EOF
Specifies a list of SWC files or directories to exclude from linking when compiling a SWF file. This option provides compile-time link checking for external components that are dynamically linked.

For more information about dynamic linking, see About linking (http://livedocs.adobe.com/flex/2/docs/00001521.html#205852).

You can use the += operator to append the new SWC file to the list of external libraries.

This parameter has been aliased as +el+.
EOF
  end
  
  add_param_alias(:el, :external_library_path)
  
  add_param(:file_specs, :files) do |p|
    p.description = "Specifies source files to compile. This is the default option for the mxmlc compiler."
  end
  
  add_param(:fonts_languages_language_range, :string) do |p|
    p.shell_name = '-compiler.fonts.languages.language-range'
    p.description =<<EOF
Specifies the range of Unicode settings for that language. For more information, see Using Styles and Themes (http://livedocs.adobe.com/flex/2/docs/00000751.html#241755) in Flex 2 Developer's Guide.

This is an advanced option.
EOF
  end
  
  add_param(:fonts_managers, :symbols) do |p|
    p.description =<<EOF
Defines the font manager. The default is flash.fonts.JREFontManager. You can also use the flash.fonts.BatikFontManager. For more information, see Using Styles and Themes in Flex 2 Developer's Guide (http://livedocs.adobe.com/flex/2/docs/00000751.html#241755).

This is an advanced option.
EOF
  end
  
  add_param(:fonts_max_cached_fonts, :number) do |p|
    p.description =<<EOF
Sets the maximum number of fonts to keep in the server cache. For more information, see Caching fonts and glyphs (http://livedocs.adobe.com/flex/2/docs/00001469.html#208457).

This is an advanced option.
EOF
  end
  
  add_param(:fonts_max_glyphs_per_face, :number) do |p|
    p.description =<<EOF
Sets the maximum number of character glyph-outlines to keep in the server cache for each font face. For more information, see Caching fonts and glyphs (http://livedocs.adobe.com/flex/2/docs/00001469.html#208457).

This is an advanced option.
EOF
  end
  
  add_param(:frames_frame, :string) do |p|
    p.shell_name = '-frames.frame'
    p.description =<<EOF
Specifies a SWF file frame label with a sequence of class names that are linked onto the frame.

For example: frames_frame = 'someLabel MyProject OtherProject FoodProject'

This is an advanced option.
EOF
  end
  
  add_param(:generate_frame_loader, :boolean) do |p|
    p.description =<<EOF
Toggles the generation of an IFlexBootstrap-derived loader class.

This is an advanced option.
EOF
  end
  
  add_param(:headless_server, :boolean) do |p|
    p.description =<<EOF
Enables the headless implementation of the Flex compiler. This sets the following:

System.setProperty('java.awt.headless', 'true')

The headless setting (java.awt.headless=true) is required to use fonts and SVG on UNIX systems without X Windows.

This is an advanced option.
EOF
  end
  
  add_param(:include_libraries, :files) do |p|
    p.description =<<EOF
Links all classes inside a SWC file to the resulting application SWF file, regardless of whether or not they are used.

Contrast this option with the library-path option that includes only those classes that are referenced at compile time.

To link one or more classes whether or not they are used and not an entire SWC file, use the includes option.

This option is commonly used to specify resource bundles.
EOF
  end

  add_param(:includes, :symbols) do |p|
    p.description =<<EOF
Links one or more classes to the resulting application SWF file, whether or not those classes are required at compile time.

To link an entire SWC file rather than individual classes, use the include-libraries option.
EOF
  end
  
  add_param(:include_path, :paths) do |p|
    p.description =<<EOF
Define one or more directory paths for include processing. For each path that is provided, all .as and .mxml files found forward of that path will
be included in the SWF regardless of whether they are imported or not.
EOF
  end
  
  add_param(:incremental, :boolean) do |p|
    p.description =<<EOF
Enables incremental compilation. For more information, see About incremental compilation (http://livedocs.adobe.com/flex/2/docs/00001506.html#153980).

This option is true by default for the Flex Builder application compiler. For the command-line compiler, the default is false. The web-tier compiler does not support incremental compilation.
EOF
  end
  
  add_param(:keep_as3_metadata, :symbols) do |p|
    p.description =<<EOF
Keep the specified metadata in the SWF (advanced, repeatable).

Example:

Rakefile:

mxmlc 'bin/SomeProject.swf' do |t|
  t.keep_as3_metadata << 'Orange'
end

Source Code:

[Orange(isTasty=true)]
public function eatOranges():void {
  // do something
}
    
EOF
  end
  
  add_param(:keep_generated_actionscript, :boolean) do |p|
    p.description =<<EOF
Determines whether to keep the generated ActionScript class files.

The generated class files include stubs and classes that are generated by the compiler and used to build the SWF file.

The default location of the files is the /generated subdirectory, which is directly below the target MXML file. If the /generated directory does not exist, the compiler creates one.

The default names of the primary generated class files are filename-generated.as and filename-interface.as.

The default value is false.\nThis is an advanced option.
EOF
  end
  
  add_param(:language, :string) do |p|
    p.description = "Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)."
  end
  
  add_param(:lazy_init, :boolean) do |p|
    p.description =<<EOF
Enables ABC bytecode lazy initialization.

The default value is false.

This is an advanced option.
EOF
  end


  add_param(:license, :string) do |p|
    p.description =<<EOF
<product> <serial-number>

Specifies a product and a serial number.  (repeatable)

This is an advanced option.
EOF
  end
  
  add_param(:library_path, :files) do |p|
    p.description =<<EOF
Links SWC files to the resulting application SWF file. The compiler only links in those classes for the SWC file that are required.

The default value of the library-path option includes all SWC files in the libs directory and the current locale. These are required.

To point to individual classes or packages rather than entire SWC files, use the source-path option.

If you set the value of the library-path as an option of the command-line compiler, you must also explicitly add the framework.swc and locale SWC files. Your new entry is not appended to the library-path but replaces it.

You can use the += operator to append the new argument to the list of existing SWC files.

In a configuration file, you can set the append attribute of the library-path tag to true to indicate that the values should be appended to the library path rather than replace it.
EOF
  end
  
  add_param_alias(:l, :library_path)
  
  add_param(:link_report, :file) do |p|
    p.description =<<EOF
Prints linking information to the specified output file. This file is an XML file that contains <def>, <pre>, and <ext> symbols showing linker dependencies in the final SWF file.

The file format output by this command can be used to write a file for input to the load-externs option.

For more information on the report, see Examining linker dependencies (http://livedocs.adobe.com/flex/2/docs/00001394.html#211202).

This is an advanced option.
EOF
  end
  
  add_param(:load_config, :files) do |p|
    p.description =<<EOF
Specifies the location of the configuration file that defines compiler options.

If you specify a configuration file, you can override individual options by setting them on the command line.

All relative paths in the configuration file are relative to the location of the configuration file itself.

Use the += operator to chain this configuration file to other configuration files.

For more information on using configuration files to provide options to the command-line compilers, see About configuration files (http://livedocs.adobe.com/flex/2/docs/00001490.html#138195).
EOF
  end
  
  add_param(:load_externs, :file) do |p|
    p.description =<<EOF
Specifies the location of an XML file that contains <def>, <pre>, and <ext> symbols to omit from linking when compiling a SWF file. The XML file uses the same syntax as the one produced by the link-report option. For more information on the report, see Examining linker dependencies (http://livedocs.adobe.com/flex/2/docs/00001394.html#211202).

This option provides compile-time link checking for external components that are dynamically linked.

For more information about dynamic linking, see About linking (http://livedocs.adobe.com/flex/2/docs/00001521.html#205852).

This is an advanced option.
EOF
  end
  
  add_param(:locale, :string) do |p|
    p.description =<<EOF
Specifies the locale that should be packaged in the SWF file (for example, en_EN). You run the mxmlc compiler multiple times to create SWF files for more than one locale, with only the locale option changing.

You must also include the parent directory of the individual locale directories, plus the token {locale}, in the source-path; for example:

mxmlc -locale en_EN -source-path locale/{locale} -file-specs MainApp.mxml

For more information, see Localizing Flex Applicationsin (http://livedocs.adobe.com/flex/2/docs/00000898.html#129288) Flex 2 Developer's Guide.
EOF
  end
  
  add_param(:localized_description, :string) do |p|
    p.description = "Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)."
  end
  
  add_param(:localized_title, :string) do |p|
    p.description = "Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)."
  end
  
  add_param(:namespaces_namespace, :string) do |p|
    p.description =<<EOF
Specifies a namespace for the MXML file. You must include a URI and the location of the manifest file that defines the contents of this namespace. This path is relative to the MXML file.

For more information about manifest files, see About manifest files (http://livedocs.adobe.com/flex/2/docs/00001519.html#134676).
EOF
  end
  
  add_param(:optimize, :boolean) do |p|
    p.description =<<EOF
Enables the ActionScript optimizer. This optimizer reduces file size and increases performance by optimizing the SWF file's bytecode.

The default value is false.
EOF
  end
  
  add_param(:output, :file) do |p|
    p.description =<<EOF
Specifies the output path and filename for the resulting file. If you omit this option, the compiler saves the SWF file to the directory where the target file is located.

The default SWF filename matches the target filename, but with a SWF file extension.

If you use a relative path to define the filename, it is always relative to the current working directory, not the target MXML application root.

The compiler creates extra directories based on the specified filename if those directories are not present.

When using this option with the component compiler, the output is a SWC file rather than a SWF file.
EOF
  end
  
  add_param(:publisher, :string) do |p|
    p.description = "Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)."
  end

  add_param(:raw_metadata, :string) do |p|
    p.description =<<EOF
XML text to store in the SWF metadata (overrides metadata.* configuration) (advanced)
EOF
  end
  
  add_param(:resource_bundle_list, :file) do |p|
    p.description =<<EOF
Prints a list of resource bundles to input to the compc compiler to create a resource bundle SWC file. The filename argument is the name of the file that contains the list of bundles.

For more information, see Localizing Flex Applications (http://livedocs.adobe.com/flex/2/docs/00000898.html#129288) in Flex 2 Developer's Guide.
EOF
  end
  
  add_param(:runtime_shared_libraries, :urls) do |p|
    p.description =<<EOF
Specifies a list of run-time shared libraries (RSLs) to use for this application. RSLs are dynamically-linked at run time.

You specify the location of the SWF file relative to the deployment location of the application. For example, if you store a file named library.swf file in the web_root/libraries directory on the web server, and the application in the web root, you specify libraries/library.swf.

For more information about RSLs, see Using Runtime Shared Libraries. (http://livedocs.adobe.com/flex/2/docs/00001520.html#168690)
EOF
  end

  add_param_alias(:rsl, :runtime_shared_libraries)

  add_param(:runtime_shared_library_path, :string) do |p|
    p.description =<<EOF
[path-element] [rsl-url] [policy-file-url] [rsl-url] [policy-file-url]
alias -rslp
(repeatable)
EOF
  end
  
  add_param_alias(:rslp, :runtime_shared_library_path)
  
  add_param(:services, :file) do |p|
    p.description = "Specifies the location of the services-config.xml file. This file is used by Flex Data Services."
  end

  add_param(:show_actionscript_warnings, :boolean) do |p|
    p.value = true
    p.show_on_false = true
    p.description =<<EOF
Shows warnings for ActionScript classes.

The default value is true.

For more information about viewing warnings and errors, see Viewing warnings and errors (http://livedocs.adobe.com/flex/2/docs/00001517.html#182413).
EOF
  end

  add_param(:show_binding_warnings, :boolean) do |p|
    p.value = true
    p.show_on_false = true
    p.description =<<EOF
Shows a warning when Flash Player cannot detect changes to a bound property.

The default value is true.

For more information about compiler warnings, see Using SWC files (http://livedocs.adobe.com/flex/2/docs/00001505.html#158337).
EOF
  end
  
  add_param(:show_deprecation_warnings, :boolean) do |p|
    p.value = true
    p.show_on_false = true
    p.description =<<EOF
Shows deprecation warnings for Flex components. To see warnings for ActionScript classes, use the show-actionscript-warnings option.

The default value is true.

For more information about viewing warnings and errors, see Viewing warnings and errors.
EOF
  end
  
  add_param(:source_path, :paths) do |p|
    p.preprocessable = true
    p.description =<<EOF
Adds directories or files to the source path. The Flex compiler searches directories in the source path for MXML or AS source files that are used in your Flex applications and includes those that are required at compile time.

You can use wildcards to include all files and subdirectories of a directory.

To link an entire library SWC file and not individual classes or directories, use the library-path option.

The source path is also used as the search path for the component compiler's include-classes and include-resource-bundles options.

You can also use the += operator to append the new argument to the list of existing source path entries.
EOF
  end
  
  add_param_alias(:sp, :source_path)

  add_param(:static_link_runtime_shared_libraries, :boolean) do |p|
    p.description =<<EOF
Statically link the libraries specified by the -runtime-shared-libraries-path option.

alias -static-rsls
EOF
  end

  add_param_alias(:static_rsls, :static_link_runtime_shared_libraries)
  
  add_param(:strict, :boolean) do |p|
    p.value = true
    p.show_on_false = true
    p.description =<<EOF
Prints undefined property and function calls; also performs compile-time type checking on assignments and options supplied to method calls.

The default value is true.

For more information about viewing warnings and errors, see Viewing warnings and errors (http://livedocs.adobe.com/flex/2/docs/00001517.html#182413).
EOF
  end
  
  add_param(:target_player, :string) do |p|
    p.description =<<EOF
Specifies the version of the player the application is targeting.

Features requiring a later version will not be compiled into the application. The minimum value supported is "9.0.0".
EOF
  end
  
  add_param(:theme, :files) do |p|
    p.description =<<EOF
Specifies a list of theme files to use with this application. Theme files can be SWC files with CSS files inside them or CSS files.

For information on compiling a SWC theme file, see Using Styles and Themes (http://livedocs.adobe.com/flex/2/docs/00000751.html#241755) in Flex 2 Developer's Guide.
EOF
  end
  
  add_param(:title, :string) do |p|
    p.description = "Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (http://livedocs.adobe.com/flex/2/docs/00001502.html#145380)."
  end
  
  add_param(:use_network, :boolean) do |p|
    p.value = true
    p.show_on_false = true
    p.description =<<EOF
Specifies that the current application uses network services.

The default value is true.

When the use-network property is set to false, the application can access the local filesystem (for example, use the XML.load() method with file: URLs) but not network services. In most circumstances, the value of this property should be true.

For more information about the use-network property, see Applying Flex Security (http://livedocs.adobe.com/flex/2/docs/00001328.html#137544).
EOF
  end
  
  add_param(:verbose_stacktraces, :boolean) do |p|
    p.description =<<EOF
Generates source code that includes line numbers. When a run-time error occurs, the stacktrace shows these line numbers.

Enabling this option generates larger SWF files.\nThe default value is false.
EOF
  end

  add_param(:verify_digests, :boolean) do |p|
    p.description = "Verifies the libraries loaded at runtime are the correct ones."
  end

  add_param(:warn_warning_type, :boolean) do |p|
    p.description = "Enables specified warnings. For more information, see Viewing warnings and errors (http://livedocs.adobe.com/flex/2/docs/00001517.html#182413)."
  end
  
  add_param(:warnings, :boolean) do |p|
    p.description =<<EOF
Enables all warnings. Set to false to disable all warnings. This option overrides the warn-warning_type options.

The default value is true.
EOF
  end
  
  # This must be the last item in this list
  add_param(:input, :file) do |p|
    p.preprocessable = true
    p.hidden_name = true
    p.description = "Main source file to send compiler"
  end

end

#input=(file) ⇒ Object

Main source file to send compiler



571
572
573
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 571

def input=(file)
  @input = file
end

#keep_as3_metadata=(symbols) ⇒ Object

Keep the specified metadata in the SWF (advanced, repeatable).

Example:

Rakefile:

mxmlc ‘bin/SomeProject.swf’ do |t|

t. << 'Orange'

end

Source Code:

Orange(isTasty=true)

public function eatOranges():void

// do something



282
283
284
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 282

def keep_as3_metadata=(symbols)
  @keep_as3_metadata = symbols
end

#keep_generated_actionscript=(boolean) ⇒ Object

Determines whether to keep the generated ActionScript class files.

The generated class files include stubs and classes that are generated by the compiler and used to build the SWF file.

The default location of the files is the /generated subdirectory, which is directly below the target MXML file. If the /generated directory does not exist, the compiler creates one.

The default names of the primary generated class files are filename-generated.as and filename-interface.as.

The default value is false. This is an advanced option.



296
297
298
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 296

def keep_generated_actionscript=(boolean)
  @keep_generated_actionscript = boolean
end

#language=(string) ⇒ Object

Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (livedocs.adobe.com/flex/2/docs/00001502.html#145380).



301
302
303
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 301

def language=(string)
  @language = string
end

#lazy_init=(boolean) ⇒ Object

Enables ABC bytecode lazy initialization.

The default value is false.

This is an advanced option.



310
311
312
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 310

def lazy_init=(boolean)
  @lazy_init = boolean
end

#library_path=(files) ⇒ Object

Links SWC files to the resulting application SWF file. The compiler only links in those classes for the SWC file that are required.

The default value of the library-path option includes all SWC files in the libs directory and the current locale. These are required.

To point to individual classes or packages rather than entire SWC files, use the source-path option.

If you set the value of the library-path as an option of the command-line compiler, you must also explicitly add the framework.swc and locale SWC files. Your new entry is not appended to the library-path but replaces it.

You can use the += operator to append the new argument to the list of existing SWC files.

In a configuration file, you can set the append attribute of the library-path tag to true to indicate that the values should be appended to the library path rather than replace it.



334
335
336
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 334

def library_path=(files)
  @library_path = files
end

#license=(string) ⇒ Object

<product> <serial-number>

Specifies a product and a serial number. (repeatable)

This is an advanced option.



319
320
321
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 319

def license=(string)
  @license = string
end

Prints linking information to the specified output file. This file is an XML file that contains <def>, <pre>, and <ext> symbols showing linker dependencies in the final SWF file.

The file format output by this command can be used to write a file for input to the load-externs option.

For more information on the report, see Examining linker dependencies (livedocs.adobe.com/flex/2/docs/00001394.html#211202).

This is an advanced option.



345
346
347
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 345

def link_report=(file)
  @link_report = file
end

#load_config=(files) ⇒ Object

Specifies the location of the configuration file that defines compiler options.

If you specify a configuration file, you can override individual options by setting them on the command line.

All relative paths in the configuration file are relative to the location of the configuration file itself.

Use the += operator to chain this configuration file to other configuration files.

For more information on using configuration files to provide options to the command-line compilers, see About configuration files (livedocs.adobe.com/flex/2/docs/00001490.html#138195).



358
359
360
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 358

def load_config=(files)
  @load_config = files
end

#load_externs=(file) ⇒ Object

Specifies the location of an XML file that contains <def>, <pre>, and <ext> symbols to omit from linking when compiling a SWF file. The XML file uses the same syntax as the one produced by the link-report option. For more information on the report, see Examining linker dependencies (livedocs.adobe.com/flex/2/docs/00001394.html#211202).

This option provides compile-time link checking for external components that are dynamically linked.

For more information about dynamic linking, see About linking (livedocs.adobe.com/flex/2/docs/00001521.html#205852).

This is an advanced option.



369
370
371
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 369

def load_externs=(file)
  @load_externs = file
end

#locale=(string) ⇒ Object

Specifies the locale that should be packaged in the SWF file (for example, en_EN). You run the mxmlc compiler multiple times to create SWF files for more than one locale, with only the locale option changing.

You must also include the parent directory of the individual locale directories, plus the token locale, in the source-path; for example:

mxmlc -locale en_EN -source-path locale/locale -file-specs MainApp.mxml

For more information, see Localizing Flex Applicationsin (livedocs.adobe.com/flex/2/docs/00000898.html#129288) Flex 2 Developer’s Guide.



380
381
382
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 380

def locale=(string)
  @locale = string
end

#localized_description=(string) ⇒ Object

Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (livedocs.adobe.com/flex/2/docs/00001502.html#145380).



385
386
387
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 385

def localized_description=(string)
  @localized_description = string
end

#localized_title=(string) ⇒ Object

Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (livedocs.adobe.com/flex/2/docs/00001502.html#145380).



390
391
392
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 390

def localized_title=(string)
  @localized_title = string
end

#namespaces_namespace=(string) ⇒ Object

Specifies a namespace for the MXML file. You must include a URI and the location of the manifest file that defines the contents of this namespace. This path is relative to the MXML file.

For more information about manifest files, see About manifest files (livedocs.adobe.com/flex/2/docs/00001519.html#134676).



397
398
399
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 397

def namespaces_namespace=(string)
  @namespaces_namespace = string
end

#optimize=(boolean) ⇒ Object

Enables the ActionScript optimizer. This optimizer reduces file size and increases performance by optimizing the SWF file’s bytecode.

The default value is false.



404
405
406
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 404

def optimize=(boolean)
  @optimize = boolean
end

#output=(file) ⇒ Object

Specifies the output path and filename for the resulting file. If you omit this option, the compiler saves the SWF file to the directory where the target file is located.

The default SWF filename matches the target filename, but with a SWF file extension.

If you use a relative path to define the filename, it is always relative to the current working directory, not the target MXML application root.

The compiler creates extra directories based on the specified filename if those directories are not present.

When using this option with the component compiler, the output is a SWC file rather than a SWF file.



417
418
419
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 417

def output=(file)
  @output = file
end

#publisher=(string) ⇒ Object

Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (livedocs.adobe.com/flex/2/docs/00001502.html#145380).



422
423
424
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 422

def publisher=(string)
  @publisher = string
end

#raw_metadata=(string) ⇒ Object

XML text to store in the SWF metadata (overrides metadata.* configuration) (advanced)



427
428
429
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 427

def raw_metadata=(string)
  @raw_metadata = string
end

#resource_bundle_list=(file) ⇒ Object

Prints a list of resource bundles to input to the compc compiler to create a resource bundle SWC file. The filename argument is the name of the file that contains the list of bundles.

For more information, see Localizing Flex Applications (livedocs.adobe.com/flex/2/docs/00000898.html#129288) in Flex 2 Developer’s Guide.



434
435
436
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 434

def resource_bundle_list=(file)
  @resource_bundle_list = file
end

#runtime_shared_libraries=(urls) ⇒ Object

Specifies a list of run-time shared libraries (RSLs) to use for this application. RSLs are dynamically-linked at run time.

You specify the location of the SWF file relative to the deployment location of the application. For example, if you store a file named library.swf file in the web_root/libraries directory on the web server, and the application in the web root, you specify libraries/library.swf.

For more information about RSLs, see Using Runtime Shared Libraries. (livedocs.adobe.com/flex/2/docs/00001520.html#168690)



443
444
445
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 443

def runtime_shared_libraries=(urls)
  @runtime_shared_libraries = urls
end

#runtime_shared_library_path=(string) ⇒ Object

path-element
rsl-url
policy-file-url
rsl-url
policy-file-url

alias -rslp (repeatable)



450
451
452
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 450

def runtime_shared_library_path=(string)
  @runtime_shared_library_path = string
end

#services=(file) ⇒ Object

Specifies the location of the services-config.xml file. This file is used by Flex Data Services.



455
456
457
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 455

def services=(file)
  @services = file
end

#show_actionscript_warnings=(boolean) ⇒ Object

Shows warnings for ActionScript classes.

The default value is true.

For more information about viewing warnings and errors, see Viewing warnings and errors (livedocs.adobe.com/flex/2/docs/00001517.html#182413).



464
465
466
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 464

def show_actionscript_warnings=(boolean)
  @show_actionscript_warnings = boolean
end

#show_binding_warnings=(boolean) ⇒ Object

Shows a warning when Flash Player cannot detect changes to a bound property.

The default value is true.

For more information about compiler warnings, see Using SWC files (livedocs.adobe.com/flex/2/docs/00001505.html#158337).



473
474
475
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 473

def show_binding_warnings=(boolean)
  @show_binding_warnings = boolean
end

#show_deprecation_warnings=(boolean) ⇒ Object

Shows deprecation warnings for Flex components. To see warnings for ActionScript classes, use the show-actionscript-warnings option.

The default value is true.

For more information about viewing warnings and errors, see Viewing warnings and errors.



482
483
484
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 482

def show_deprecation_warnings=(boolean)
  @show_deprecation_warnings = boolean
end

#source_path=(paths) ⇒ Object

Adds directories or files to the source path. The Flex compiler searches directories in the source path for MXML or AS source files that are used in your Flex applications and includes those that are required at compile time.

You can use wildcards to include all files and subdirectories of a directory.

To link an entire library SWC file and not individual classes or directories, use the library-path option.

The source path is also used as the search path for the component compiler’s include-classes and include-resource-bundles options.

You can also use the += operator to append the new argument to the list of existing source path entries.



495
496
497
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 495

def source_path=(paths)
  @source_path = paths
end

Statically link the libraries specified by the -runtime-shared-libraries-path option.

alias -static-rsls



502
503
504
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 502

def static_link_runtime_shared_libraries=(boolean)
  @static_link_runtime_shared_libraries = boolean
end

#strict=(boolean) ⇒ Object

Prints undefined property and function calls; also performs compile-time type checking on assignments and options supplied to method calls.

The default value is true.

For more information about viewing warnings and errors, see Viewing warnings and errors (livedocs.adobe.com/flex/2/docs/00001517.html#182413).



511
512
513
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 511

def strict=(boolean)
  @strict = boolean
end

#target_player=(string) ⇒ Object

Specifies the version of the player the application is targeting.

Features requiring a later version will not be compiled into the application. The minimum value supported is “9.0.0”.



518
519
520
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 518

def target_player=(string)
  @target_player = string
end

#theme=(files) ⇒ Object

Specifies a list of theme files to use with this application. Theme files can be SWC files with CSS files inside them or CSS files.

For information on compiling a SWC theme file, see Using Styles and Themes (livedocs.adobe.com/flex/2/docs/00000751.html#241755) in Flex 2 Developer’s Guide.



525
526
527
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 525

def theme=(files)
  @theme = files
end

#title=(string) ⇒ Object

Sets metadata in the resulting SWF file. For more information, see Adding metadata to SWF files (livedocs.adobe.com/flex/2/docs/00001502.html#145380).



530
531
532
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 530

def title=(string)
  @title = string
end

#use_network=(boolean) ⇒ Object

Specifies that the current application uses network services.

The default value is true.

When the use-network property is set to false, the application can access the local filesystem (for example, use the XML.load() method with file: URLs) but not network services. In most circumstances, the value of this property should be true.

For more information about the use-network property, see Applying Flex Security (livedocs.adobe.com/flex/2/docs/00001328.html#137544).



541
542
543
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 541

def use_network=(boolean)
  @use_network = boolean
end

#verbose_stacktraces=(boolean) ⇒ Object

Generates source code that includes line numbers. When a run-time error occurs, the stacktrace shows these line numbers.

Enabling this option generates larger SWF files. The default value is false.



549
550
551
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 549

def verbose_stacktraces=(boolean)
  @verbose_stacktraces = boolean
end

#verify_digests=(boolean) ⇒ Object

Verifies the libraries loaded at runtime are the correct ones.



554
555
556
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 554

def verify_digests=(boolean)
  @verify_digests = boolean
end

#warn_warning_type=(boolean) ⇒ Object

Enables specified warnings. For more information, see Viewing warnings and errors (livedocs.adobe.com/flex/2/docs/00001517.html#182413).



559
560
561
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 559

def warn_warning_type=(boolean)
  @warn_warning_type = boolean
end

#warnings=(boolean) ⇒ Object

Enables all warnings. Set to false to disable all warnings. This option overrides the warn-warning_type options.

The default value is true.



566
567
568
# File 'lib/sprout/tasks/mxmlc_documentation.rb', line 566

def warnings=(boolean)
  @warnings = boolean
end