1

Currently we have a large project that was created in Flash and AS3. I know that you can't really compile or build fla's with ANT. I have seen all of the flex capabilities with ANT. So let me explain a little of what and why we are trying to do this and hopefully someone will have a suggestion on how to solve this.

  • We want to customize our final product so that we can swap out images and color schemes (other things too) on the command line.
  • We want to use ANT to be able to build our project and control the command line.
  • Basically end product, the user will just tell it where the images are and only take a couple minutes.

Do we have to convert our project into Flex to do this? Anything to kick start me would be great. I have never used ANT so I am trying to learn that along the way in completing this.

p.s. I am messing around with ANT in Eclipse currently.

stw7651
  • 37
  • 5
  • I'm not sure how you intend to use the "command line" to swap out assets. My impulse is to recommend externalizing the assets and color scheme information so they are easily swapped at runtime without compiling. It depends what type of assets you want to replace. – JeffryHouser Apr 09 '12 at 18:05
  • Okay, assets that will be changed are mainly images and fonts. Most assets have an AS linkage if that effects this. All these images are in the library currently and I am not sure how exactly I should externalize these? – stw7651 Apr 09 '12 at 18:36
  • The easiest way to do this in Flex is using CSS, either defined at compile time or loaded in at run-time through a swf export of the CSS (also known as a theme). There are more customized approaches that can be taken but since there will certainly be a fair amount of work in migration from Flash to Flex I'd say it's probably worth it to just work the transition to using CSS style definitions for styles and skin classes to use is probably worth fixing right away rather than having to deal with it over time. Also I'd suggest checking out maven as an alternative/supplement to ANT. – shaunhusain Apr 09 '12 at 18:50

1 Answers1

0

Ant is not really necessary. There are two immediate solutions I can think of:

Conditional compilation constants allow you have all the content visible and editable within the Actionscript files, which seems more manageable.

iND
  • 2,663
  • 1
  • 16
  • 36
  • currently we are using the conditional compilation constants. The problem is we could get a completely new layout and we have to create a new config and go through all the code and make sure its correct. We don't want anymore coding, it should be all set in stone and just modify the images. – stw7651 Apr 10 '12 at 18:25
  • Ok, then the JSFL option should work out. JSFL is a specialized javascript, so should not present great difficulties. You can traverse the DOM (it is non-intuitive at first, so you *must* read the docs), and you can use regex for replacing file data. After you run a few tests, let me know if this is the answer you need. – iND Apr 10 '12 at 23:47