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

Setting Up Web Deployment

Adding Information to a SWF

Whether you’re debugging or just compiling, it is always good practice to have some sort of info panel in your SWF. What do I mean by info panel? This can be an actual overlay or context menu with profiling information, memory usage, build/compile version, the user who compiled that version, and more.

One of the easiest ways to implement an info panel in AS3 is by using the context menu or right-click menu.

Note

If you need a good, basic visual profiler, I highly recommend Shane McCartney’s SWF Profiler Class. It shows your SWF’s memory usage and frames per second in a very visual manner. For more information, see http://lostinactionscript.com/2008/10/06/as3-swf-profiler/.

Since this class is open source, it can also be a good base on which to write your own extension.

Why do we want to add an info panel? Consider the following case: you’re testing a project you’ve been working on with a team, a client, or maybe open source collaborators. But what version was deployed online yesterday? And who uploaded it? And at what time was it created?

An info panel saves you time and energy by enabling you to just right-click on the SWF in that web page—no more opening an FTP connection to find out what time the file was uploaded and other relevant information.

What do we want to accomplish? We want a context menu that shows us information about a file’s date, operating version, and build number; which user compiled it; and a line indicating your ...

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