Categories

## FDT and ANT – part 2

Trying to build the ultimate build.xml in ANT: debug/production zip ftp version … etc: will save a lot of keystrokes in FDT4

All the information about the ultimate build.xml can be found on the internet, so I will post the links and you can figure it out for yourself.

I used the build.xml made by Jankees van Woezik (Base 42) as the base of my ultimate ANT build file. You can read about it and download here: My workflow with ANT and FDT.

Because we work a little bit different I had to do some modifications (for example: I work with 2 swf: preloader.swf and main.swf and work on PC). I created a list of stuff that I wanted to do with ANT and behind the “wish” you find a link to the site I found the solution for the problem:

1. base ant script >> http://blog.base42.nl/2009/12/11/my-workflow-with-ant-and-fdt/
3. install ftp protocol in fdt/eclips >> http://www.rumblingskies.com/blog/?p=75
4. update version ant script >> http://github.com/base42/projectcreator/blob/master/original/flash/builders/ant/updateVersionFile.xml
5. another update ant script >> http://www.sephiroth.it/weblog/archives/2010/01/update_your_app_version_using_ant_bui.php
6. update Firefox (only works on OSX) >> http://epologee.com/blog/2009/focus-and-reload-pages-in-firefox-with-ant/
7. html wrapper >> http://fdt.powerflasher.com/blog/?p=1392

Something like this needs some time to find its place in my workflow, and will be changed a lot. That is the reason why I’m not posting my ant file… not because it’s ugly or a secret… but because I need to refine it.

Oh… I also have a small todo list (perhaps you could call it a nice-to-have-list)

As you can see, these are the thing that I don’t need a lot, but perhaps in the nearby future…

### FTP (File transfer protocol)

Ant doesn’t have the FTP protocols default installed so you need to update FDT4/Eclipse.
You can find the explanation here: http://www.rumblingskies.com/blog/?p=75

Update #1:The locations of the files you need are changed so let me post the correct ones here:

Save these files in the following folder: C:\FDT\plugins\org.apache.ant_***\bin\

Update #2: hmmm jakarta-oro seems to be Retired… and I haven’t got time to figure this out right now…

You probably can add the zips you downloaded there, I extracted the two files and that worked for me. I did this in FDT4 and all I got was an alert about “The specified Ant runtime classpath does not include a tools.jar library…..” which I ignored (and without any problem).

After the installment of the two .JAR files you need an ANT script to get thing started which I just copied from the previous link:
[as light=”true” wraplines=”true”]
<ftp server="123.456.78.90"
port="21"
userid="my_user_id"
passive="no"
depends="yes"
binary="yes">
<fileset dir="../bin" />
</ftp>
</target>[/as]

### Update version

It’s a combination of writing a build.txt file and a Version.as file.
See what Jankees van Woezik did and I use the script from Sephiroth to have a building number that adds 1.

### Firefox refresh

this feature is awesome in combination with ftp, so here the one who found the how: Eric Paul (epologee). Read more about it here: focus-and-reload-pages-in-firefox-with-ant

So downloaded the file, installed the firefox extension and gave it a run:
[as light=”true” wraplines=”true”]
<target name="focus Firefox and reload page">Execute failed: java.io.IOException: Cannot run program "open" (in directory "C:\foo\bar\test"): CreateProcess error=2, Het systeem kan het opgegeven bestand niet vinden
[/as]

After some googling, I found that it’s a OSX command that doesn’t work on Windows:

[as highlight=”1″ light=”true” wraplines=”true”]
<target name="focus Firefox and reload page">
<exec executable="open">
<arg line="-a Firefox" />
</exec>
<exec executable="flash/tools/fresno/fresno">
</exec>
</target>[/as]

I haven’t found a solution that refreshes the page like Fresno does on Windows.
So the only thing I can think of is:

[as light=”true” wraplines=”true”]
<echo>Launch in Firefox (not really a reload)</echo>
<exec executable="H:/Program Files/Mozilla Firefox/firefox.exe" spawn="yes">
<arg line="\${flashproject.preview.url}" />
</exec>
</target>
[/as]

### Html wrapper

I changed the file a little bit (removed the history) not really difficult.

### Folders

You get the idea….

Categories

## Flash tools of the trade: flash-plugin switcher

Very recently I wrote about a Firefox extension: the FlashTracer written by Alessandro Crugnola. This extension will only make the hearts of Flash developers go faster, which it did in my case: I love this plugin! And although this is a relative new Firefox extension, it already helped me debug a application that I build.

Alessandro Crugnola is also the guy that gave us SE|PY (this is the editor I use for Flash programming)

Alessandro created another Firefox extension: Flash Switcher extension for Firefox

Flash Switcher – This extension comes with all the currently published flash player plugins (from the version 2 to the most recent 9,0,16) and allows you to easily switch from one plugin to another, or also to remove the currently installed plugin (maybe for testing the express install).

I used to use KewBee Plugin Switcher. Which is now for free, but if I remember correctly will be a commercial program. The big plus of that program is that it also works for IE, but who cares…. (and windows doesn’t like that you install / uninstall something without their knowledge, so it creates lot of ERRORS).

Categories

## Flash tools of the trade: debug

I try not to regurgitate info from other blogs…
But I have to talk about a entry from Alessandro: because it makes me “extremely” happy.

The creator of SE|PY: Alessandro Crugnola has created his first firefox extension. Good for him, but what it´s to me?

Well… it’s one of the first tools that makes it possible to trace / debug in Firefox.
While running any .SWF Flash file in your browser you can see all the output generated by the “trace” flash functions in this sidebar component. This is very useful especially working with server side technology.
You can debug without anyone knowing this, even with on a live site: only people that have this extension installed will know this.

You just need to install the debug version of the flashplayer and the Firefox extension and you’re ready to go!

It made me painfully aware that we Flash-developers leave a lot of “traces” behind in the .SWF’s.
But this can be fixed: just check ‘Omit trace actions’ in the publish settings.

FlashTracer – While running any .swf Flash file in your browser you can see all the output generated by the “trace” flash functions in this sidebar component.
You *NEED* the flash player debug version to run this extension correctly: flashplayer_9_plugin_debug

Update #1: A colleague found a “funny” trace at youtube: it has something to do with the play button not wanting to appear….