7-day free trial to lynda.com video training library.

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.

Quick Tip: Installing Adobe Extensions

Justin | extensions,tips | Wednesday, November 16th, 2011

If you have multiple versions of Adobe (or Macromedia) software installed, you probably have multiple versions of Extension Manager, the application that helps you install and manage extensions. This can lead to some confusion.

When you double-click an MXP (or ZXP) file, your operating system open your default version of Extension Manager. This may not be the version that you want, however. Suppose you have Flash Pro CS4 and Flash Pro CS5 installed. Your system will (probably) automatically launch Extension Manager CS5 when you attempt to install a new extension. This is okay if you want to install the extension in Flash CS5, but it will not be available in Flash CS4.

There are other issues that crop up when you have versions installed in multiple languages (and in some cases, if your language is not English). Luckily, there’s a simple way ensure that you’re using the correct version of Extension Manager.

  1. Launch the version of Flash Pro (or Dreamweaver, or Fireworks) in which you’d like to install the extension.
  2. Go to Help > Manage Extensions… and it will launch the matching installation of Extension Manager.

SmartMouth Version 1.1 Now Available

Justin | animation,extensions,Flash,software | Monday, November 7th, 2011

We’ve just released version 1.1 of the SmartMouth Flash extension with a couple of added features to help with the lip syncing process. This update is FREE to anyone who has already purchased licenses of SmartMouth.

Once you’ve downloaded and installed the new version, you should see a button at the bottom of the SmartMouth panel that says Advanced…

New Advanced Features

The Advanced button will bring up a window with 2 new options.

Looping

Loop settings allow you to control the loop setting applied to the outputted symbol instance(s). This can be applied if you want to animate each mouth shape, rather than use static images.

Keyframe Frequency

Keyframe Frequency allows you to control the frequency of keyframes that are automatically generated (1s – every frame, 2s – every other frame, or 3s – every third frame). You can use this setting to animate your mouth at a frame rate lower than that of the rest of your animation. For example, your animation might be set to 30 fps, but you want your mouth to animate at 15 fps, so that the mouth doesn’t look frantic. In this case, you could select 2s.

The image below demonstrates the different outputs generated by altering the Keyframe Frequency.

These new features are based on user requests. Please let us know what you think!

Adobe MAX 2011

Justin | conferences,Flash | Monday, September 12th, 2011

We will be attending again Adobe MAX this year. I will be leading 2 labs on Building Flash Extensions.

Hope to see you there!

Script: Backup and Restore Flash Pro Config Files

Justin | Flash,jsfl | Thursday, September 1st, 2011

I had a customer who was losing Flash configuration data due to roaming profiles in Windows, similar to the situation described on this forum thread.

So, I wrote this script as a potential antidote to that problem. When the script is run (by opening with Flash Pro), it will allow you to either back-up or restore all of your configuration files for that installation of Flash Pro.

In certain specific cases (no guarantees)—where the machine, the username, and the Flash version remain consistent—this could be used to maintain a SmartMouth activation (as well as other extensions and settings) through a Flash, CS, or OS reinstall.

The script is pretty experimental at this point, so please use with caution.

Download
backup_restore_Flash_config.jsfl (right-click and choose Save Link As…)

SWF Protector Giveaway Winners

Justin | competitions | Thursday, August 25th, 2011

Congratulations to the following users: ReviewsAntivirs, humulus, and TRY for winning copies of SWF Protector from our giveaway!

Thanks to everyone for participating! We’ll have some more reviews and giveaways in the near future.

SWF Protector Product Review & Giveaway

Justin | competitions,product review | Thursday, August 18th, 2011

I was approached by DComSoft to review their product, SWF Protector. They also offered to provide 3 free licenses for a giveaway. More on that below.

SWF Protector alters your SWF files so that it is more difficult to decompile them. This makes it more difficult for others to reverse engineer parts of your product that you’d like to remain secret. As has been noted on several other sites, there is no 100% sure method to protect your Flash content, but there are ways to make it more difficult. If someone is intent on breaking into your files, and they’re smart enough, they will find away. The usefulness in SWF encryption and obfuscation products is largely to reduce the number of people who can decompile your code by making decompilation more difficult.

That said, here are the criteria I used to review SWF Protector:

  1. Usability: how easy is it to operate the application?
  2. Is the SWF still fully-functional after protection? (You’d be surprised how many tools make the SWF inoperable).
  3. Can the SWF be decompiled using readily available tools?
  4. Bonus points for useful advanced features.

(more…)

Page 1 of 1812345...10...Last »