How to compile a list of AS-files to SWF with only one gradle file?

Andreas's Avatar

Andreas

08 Oct, 2013 10:07 AM

Hi,

I want to store some images in single SWF-container files, so I can dynamically load them depending on user data.
For now I use a template and use a small script o generate a single .gradle-file for each container. Is there a way to have only one .gradle file?

  1. Support Staff 1 Posted by Yennick Trevels on 08 Oct, 2013 12:07 PM

    Yennick Trevels's Avatar

    The closest you'll get to a solution is probably defining multiple "environments" as described in Maxim's excellent post here: http://blog.riastar.net/2013/03/28/gradlefx-multiple-configurations/

    Certainly have a look to see whether this can solve your problem.

  2. Support Staff 2 Posted by Maxime Cowez on 08 Oct, 2013 07:56 PM

    Maxime Cowez's Avatar

    Could you show us your generated script? I would just like to know how the image is compiled into the swf. I'd think that would require embedding through code (well metadata) in an AS class, no? If so, I guess you could write a task that takes a list of class paths, loops over them, sets the includes compiler argument to include the one class that embeds the one image (through GradleFx' additionalCompilerOptions), and executes the compile task in each iteration.

  3. Andreas closed this discussion on 18 Nov, 2013 01:05 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac