CacheMan: Application Cache Utility for HTML5 websites & Web Apps

Justin | AIR,HTML5 | Monday, July 29th, 2013

In conjunction with one of my recent Lynda.com courses, HTML5 Projects: Creating an Advanced Responsive Presentation, I created this simple utility to take care of an otherwise tedious and unforgiving* task: generating an Application Cache Manifest file.

CacheMan not only generates the manifest file, it also attaches the manifest to the target HTML files. This attached manifest file will tell the user’s browser to cache the listed files so that they can be viewed offline.

*In many cases, a site will fail to cache if there’s a single typo in the manifest file.

Usage

The Main HTML field is where you assign the primary HTML file(s) that will trigger the Application Cache.

The Dependent Files are the files (or their parent folders) that will be added to the cache. If the Auto Detect Dependent Files box is checked, CacheMan will search any files added to the Main HTML category for dependent files (CSS, JavaScript, images, video, audio, etc).

For both the Dependent Files and Main HTML fields, files can be added using the plus (+) button, or by simply dragging and dropping files (as shown in the video demo below).

Files can be omitted from the manifest, or treated as network files (not cached, but pulled from the server) by using the Ignore File Extensions and Network File Extensions, respectively.

cacheman user interface

Demo

Tips

Make sure that you add theĀ .appcache mime-type to your server:

AddType text/cache-manifest .appcache

For more info on the Application Cache feature of HTML5, check out A Beginner’s Guide to Using the Application Cache.

If you’re using in5 to create your HTML, in5 has a built-in caching option, so there’s no need to use CacheMan.

Installation

You can install CacheMan using the badge below.

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

Or you can download the file directly cacheman.air (Adobe AIR is required).

Note: The application is self-signed, so you can ignore the installation warning about the publisher being “unknown.”

CacheMan is available at no cost, but donations are welcome.

Flannel: Open Newer FLA Files

Justin | AIR,Animate/Flash,software | Tuesday, March 6th, 2012

On a few occasions, I’ve had to open Flash CS5.5 files on a machine with CS5. Since the FLA format is now XML- and ZIP-based, it’s relatively easy to unzip the package, open a file, and set the version back so that the file can be opened in Flash CS5. It does, however, take time. So I decided to make this process into an easy-to-use desktop application.

Usage

Just drag and drop a Flash CS5.5 (or CS6, or CC) FLA file onto Flannel and it will make a copy and append _CS5 to the file name. That file can be opened in Flash CS5 (or later). Conversion for CS4 is a little trickier, since several new elements were added for CS5, but I’m working on it.

Installation

You can install Flannel using the badge below.

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

Or you can download the file directly Flannel.air (Adobe AIR is required).

Flannel is available at no cost, but donations are welcome.

Looking for more cool Flash stuff?

If you like Flannel, you should also check out the numerous Flash Extensions and other tools that we have available.

Adding Menu Items to Existing Menus with Adobe AIR

Justin | ActionScript,AIR,tips | Tuesday, April 5th, 2011

I’m working on a new desktop (Adobe AIR) application. More on that app in the months to come. In the process of putting together a prototype, I’ve found that NativeMenu.getItemByName doesn’t work (at least not on my system). I initially used the following code to try to add a menu item to the File menu:

var nm:NativeMenu = NativeApplication.nativeApplication.menu;
var nm0:NativeMenuItem = nm.getItemByName('File');
var mi:NativeMenuItem = new NativeMenuItem("Export...");
mi.addEventListener(Event.SELECT, exportSelected);
nm0.submenu.addItem(mi);

Unfortunately, the menu item resolves to null in the above code and subsequently generates an error. Instead, I’m using the following code (that works):

var nm:NativeMenu = NativeApplication.nativeApplication.menu;
var nm0:NativeMenuItem = getMenuItemByLabel(nm, 'File');
var mi:NativeMenuItem = new NativeMenuItem("Export...");
mi.addEventListener(Event.SELECT, exportSelected);
nm0.submenu.addItem(mi);

The getMenuItemByLabel function is as follows:

function getMenuItemByLabel(menu:NativeMenu, labelName:String):NativeMenuItem {
var count:uint = menu.items.length;
for(var i:uint=0; i < count; i++){
var item:NativeMenuItem = menu.getItemAt(i);
if(item.label === labelName) return item;
}
return null;
}

That way I can get the menu by name and rest assured that I’ve added to the File menu (or any other existing menu) without having to guess its index.

Duplix: Batch Duplication Utility

Justin | AIR,software | Wednesday, January 7th, 2009

Duplix is a batch duplication utility for Mac OS X, Windows, and Linux. The Duplix utility quickly duplicates files and folders using numeric or custom naming. The numeric naming option allows the user to set a range of values and includes a “minimum digits” setting which can automatically add zeroes to the file names to maintain alphabetical sorting for the duplicated files. The custom naming option allows the user to type or paste in a series of names for the duplicated files. The custom names can be separated by commas, spaces, or line breaks. Both numeric and custom naming options allow for a prefix and suffix for the duplicated file names, and even allow the user to alter the file extension if needed. Existing files can be preserved or overwritten by duplicates depending on the option selected. The user can also choose to delete the original file or folder after duplication if desired.

Installation

You can install Duplix directly from this webpage (if you don’t have the AIR runtime yet, this will install that for you as well):

Please upgrade your Flash Player This is the content that would be shown if the user does not have Flash Player 9.0.115 or higher installed.

How to Use Duplix

Check out these video demos:

Screenshots below the fold… (more…)

DuplicatAIR is now Duplix

Justin | AIR,software | Tuesday, January 6th, 2009

I originally posted this application with the name DuplicatAIR. Then as I was reading through the submission agreement on the Adobe AIR Marketplace, I noticed that they didn’t take too kindly to having “AIR” within the name of the application. Then I ran across this post and I decided to pull DuplicatAIR offline and rename it.

The application is now called Duplix.

I’m leaving this page available since it already went live. If you happen upon this page, please redirect your browser to the new post.