Tag Archives: AIR

Pure AS3 AIR ApplicationUpdaterUI

This may be well known, but it wasn’t terribly obvious to me from Adobe’s documentation.

If you want to use the adobe AIR update framework including the UI in a pure AS3 AIR project, it looks like you need to start using the flex framework.Indeed, the documentation for “flash apps” recommends custom building an interface.

This is unnecessary – I picked out the applicationupdater_ui.swc from flex_sdk\frameworks\libs\air and accessed the ApplicationUpdaterUI class just as the documentation advised for a flex implementation and Lo – it’s all there, and it doesn’t include the whole of flex. It does add a few hundred kb, but it’s an installable AIR app, so that’s not such a big deal.

 

 

photoshop script for producing logo files for adobe AIR apps

While knocking up a simple little adobe AIR application I saw that there are many available icon sizes that can be used. Being a lazy programmer I thought I’d script this up rather than wading through photoshop. It’s pretty easily customizable if you want to change the sizes

This code goes in a .jsx file and run on the currently open document in photshop by going to: File -> Scripts -> Browse

var curDoc = app.activeDocument;

saveAsIconSize(512);
saveAsIconSize(128);
saveAsIconSize(72);
saveAsIconSize(57);
saveAsIconSize(48);
saveAsIconSize(36);
saveAsIconSize(32);
saveAsIconSize(29);
saveAsIconSize(16);

function saveAsIconSize(size) {
    
    curDoc.resizeImage(UnitValue(size,"px"), UnitValue(size,"px"), null, ResampleMethod.BILINEAR);
    
    // our web export options
    var options = new ExportOptionsSaveForWeb();
    options.quality = 100;
    options.format = SaveDocumentType.PNG;
    options.transparency = true;
    options.interlaced = false;
    options.optimized = true;
    options.PNG8 = false;
    
    var newName = 'icon-'+size+'x'+size+'.png';

    curDoc.exportDocument(File(curDoc.path+'/'+newName),ExportType.SAVEFORWEB,options);     
    
}