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.

EaseCaddy Resources Posted

Justin | Animate/Flash,animation,extensions | Wednesday, February 29th, 2012

I’ve posted some EaseCaddy resources.

I’ll continue to collect them, if you have custom eases or tutorials to share (on easing), you can post them in the comments below or send them directly to us.

Google SpreadSheet Scripts for Better Printing

Justin | GoogleDocs | Tuesday, February 14th, 2012

I’ve been using Google Docs more lately. Especially for spreadsheets. One thing that I noticed when trying to print is the effect of excess empty cells. When you choose File > Print in Google Docs, the system renders a PDF from the server and prompts you to save that PDF. If you have several empty rows and column, those will be included in your PDF. If you selected Fit to Page (the default), your text (like mine) could be tiny. I went looking for a Set Print Area option similar to the one found in MS Excel, but could not find it. So I wrote a few custom scripts to solve the issue instead.

Locating the Scripts

The 2 scripts below have been submitted to the Google Script Gallery and should be available by choosing Tools > Script gallery… then searching for the term crop. As of writing this post, the first script below is already available.

I’m including the code below in case anyone has difficulty finding them or would like to copy and modify the code for their own purposes.

Crop to Selection

Crops cells to the current selection for better printing.
function cropToSelection() {
  var sSheet = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = sSheet.getActiveSheet();
  var range = sSheet.getActiveSelection();
  var startCol = range.getLastColumn();
  var startRow = range.getLastRow();
  var endCol = sheet.getMaxColumns();
  var endRow = sheet.getMaxRows();
  try{sSheet.deleteColumns(startCol, endCol - startCol);} catch(e){};
  try{sSheet.deleteRows(startRow, endRow - startRow);} catch(e){};
}

Crop All Sheets

Crops each sheet in the worksheet to the cells that contain content.
function cropAllSheets() {
  var sSheet = SpreadsheetApp.getActiveSpreadsheet();
  var numSheets = sSheet.getNumSheets();
  var sheets = sSheet.getSheets();
  var i;
  for(i=0; i < numSheets; i++){
    var sheet = sheets[i];
    var range = sheet.getDataRange();
    sheet.setActiveSelection(range);
    var startCol = range.getLastColumn();
    var startRow = range.getLastRow();
    var endCol = sheet.getMaxColumns();
    var endRow = sheet.getMaxRows();
    if(endCol > startCol) sheet.deleteColumns(startCol, endCol - startCol);
    if(endRow > startRow) sheet.deleteRows(startRow, endRow - startRow);
  }
}

EaseCaddy Pro Released

Justin | Animate/Flash,animation,extensions | Thursday, February 9th, 2012

There is now a Pro version of our popular EaseCaddy extension (original post). The EaseCaddy panel is a Flash extension that allows you to to store, import, export, and apply custom eases.

The basic version of EaseCaddy is still totally free. By upgrading to the Pro version, you’ll be able to apply an ease to multiple tweens (motion and/or classic) simultaneously.

You can find more information about the new version of EaseCaddy on the product page.

Creating Flash Extensions – Responding to a Dialog Choice

Justin | jsfl,Tutorials | Monday, January 9th, 2012

In a previous tutorial, I showed the basics of creating dialogs. In this post, I’ll elaborate on how to respond to a dialog, specifically how to cease execution when the user has selected cancel.

Here’s the code sample that was included in the aforementioned tutorial:

if (result == null) {
//do nothing
} else {
//use the value of result to proceed with the script
}

This example reflects code for custom XMLUI panel, but this technique can also be used for alerts, prompts, and confirmations.

There are 2 easy ways to halt the script if the user has selected cancel and the result is null:

  1. Call a function only if the result is not null.
  2. If the conditional statement above occurs inside a function block, call return to exit the function.

Here’s a code sample for method 1:

var dom = fl.getDocumentDOM();
var xpanel = dom.xmlPanel(absoluteFileLocation);
if (result == null) {
//do nothing
} else {
run();
}

You’d then define a function that execute all of the requisite code:
function run(){
//all the action takes place here
}

If the result is null, the function is never triggered.

Here’s a sample for method 2:

run();
function run(){
var dom = fl.getDocumentDOM();
var xpanel = dom.xmlPanel(absoluteFileLocation);
if (result == null) return;
//continue executing otherwise
}

Essentially, the entire process is wrapped in a function, so it’s easy to jump right out when needed.

Either method will do, sometimes one method suits a particular script.

Page 30 of 55« First...1020...2829303132...4050...Last »