| Class | Sprout::SWFMillTask |
| In: |
bundles/as2/lib/sprout/tasks/swfmill_documentation.rb
bundles/as2/lib/sprout/tasks/swfmill_rdoc.rb bundles/as2/lib/sprout/tasks/swfmill_task.rb |
| Parent: | ToolTask |
Compile a set of assets (pngs, gifs, jpegs, mp3s, fonts, etc) into a library swf using SWFMill.
The resulting SWF file can be a Flash Player 6, 7 or 8 file format and is appropriately used as asset input for MTASC or MXMLC compilation.
This task simplifies SWFMill usage so that you can essentially point it at a directory of images, set the task as a prerequisite for an MTASCTask or an MXMLCTask, and have them self-configure to include the output.
A simple example is as follows:
swfmill 'assets/skins/SomeProjectSkin.swf' do |t|
t.input = 'assets/skins/SomeProjectSkin'
end
The input can be one of the following
The file:
yourcompany/yourproject/SomeFile.png
Will be available in the compiled swf with a linkage identifier of:
yourcompany.yourproject.SomeFile
The input can be one of the following
* SWFMill XML document: Create and manually manage an input file as described at http://www.swfmill.org * Directory: if you point at a directory, this task will automatically include all files found forward of that directory. As it descends into child directories, the items found will be exposed in the library using period delimiters as follows:
The file:
yourcompany/yourproject/SomeFile.png
Will be available in the compiled swf with a linkage identifier of:
yourcompany.yourproject.SomeFile
The output parameter should not be set from outside of this task, the output file should be the task name
The output parameter should not be set from outside of this task, the output file should be the task name
Set the SWFMill simple flag. This setting will determine what kind of xml document the compiler expects. Unless you really know what you‘re doing with SWFMill, this setting will usually be left alone.
Set the SWFMill simple flag. This setting will determine what kind of xml document the compiler expects. Unless you really know what you‘re doing with SWFMill, this setting will usually be left alone.
An ERB template to send to the generated SWFMillInputTask. This template can be used to generate an XML input document based on the contents of a directory. If no template is provided, one will be created for you after the first run, and once created, you can configure it however you wish.
An ERB template to send to the generated SWFMillInputTask. This template can be used to generate an XML input document based on the contents of a directory. If no template is provided, one will be created for you after the first run, and once created, you can configure it however you wish.