Skip to Main Content
Automating ActionScript Projects with Eclipse and Ant
book

Automating ActionScript Projects with Eclipse and Ant

by Sidney de Koning
October 2011
Intermediate to advanced content levelIntermediate to advanced
98 pages
2h 18m
English
O'Reilly Media, Inc.
Content preview from Automating ActionScript Projects with Eclipse and Ant

Deploying Your SWF Files to a Different Source

One of the cool features of Ant is that you are not bound to only doing local development. You can also deploy and/or copy your files to a web server, FTP server, or a network share.

Let’s start with an inventory of what we need when we want to test on a web server:

  • An HTML file that embeds our SWF file

  • The JavaScript embed method via SWFObject (http://code.google.com/p/swfobject/)

  • A specific folder structure so that everything is neatly organized

That’s it! So what are we actually going to do? We have all the needed project properties defined in our property file. With those, we can build a directory structure and generate our actual HTML file. We do this with Ant so we don’t have to do it by hand for every project we do. This is a huge time-saver!

We are actually going to change our build files a little bit. Because deploying is a different process than compiling and debugging, I prefer to work in a different file called deploy.xml.

The benefit of using separate files is that the functionality defined in the filename is neatly encapsulated in one file—there’s no searching required, since the name says it all. Each file can be easily distributed to freelancers or colleagues who are setting up the builds on their machines.

Let’s start editing our build.xml file, and strip out everything except loading Growl, loading our properties, and creating the timestamp target:

<?xml version="1.0" encoding="UTF-8"?> <project name="Main Build file" basedir="."> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

AdvancED ActionScript 3.0: Design Patterns

AdvancED ActionScript 3.0: Design Patterns

Ben Smith
ActionScript 3.0 Cookbook

ActionScript 3.0 Cookbook

Joey Lott, Darron Schall, Keith Peters
Migrating to Swift from Flash and ActionScript

Migrating to Swift from Flash and ActionScript

Radoslava Leseva Adams, Hristo Lesev

Publisher Resources

ISBN: 9781449314736Errata PageSupplemental Content