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

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.

Features vs. Bandages

Justin | ActionScript,tips | Thursday, April 28th, 2011

At my part time job with Pearson, I’m a member of a team that maintains a large template system for e-learning projects. This template system allows us to produce very large media-rich courses in a relatively short span of time. In these projects, as well as others, I try to teach and maintain a system of adding features, rather than bandaging functionality that needs to change. When a client request comes in, I challenge myself and my colleagues to consider how this request could be made part of our permanent (and ongoing) system, rather jury rigging the current system to temporarily support new functionality. This feature-based approach has several long-term advantages that I will elaborate on this post.

(more…)

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.

Article Round-up

Justin | articles,design,Flash,links,tips | Tuesday, October 19th, 2010

We’re keeping quite busy around here! Here’s a quick round-up of some recent articles that I’ve published.

5 Flash Animation tips in 5 days on the Peachpit blogs:

Also on the Peachpit site, there’s an excerpt on Character Animation from our recent book with Chris Georgenes.

I also have a new video tutorial over at ActiveTuts+ on Creating Advanced Motion Presets in Flash with JSFL.

In addition to the recent advice page I added on Learning Flash, I’m working on a page about becoming a graphic designer/Flash animator/digital artist. It includes some of my background and lessons learned. That article is pretty much on hold as we work toward the SmartMouth release (hopefully just another week), and I will pick it up after that.

Adobe Flash Learning Links

Justin | design,Flash,links,tips | Friday, August 20th, 2010

I’ve had a number of users contacting me regarding ways to learn Adobe Flash Professional. There are a lot of great resources available for users interested in animation, design, and development in Flash.  Whether you’re an advanced user, or totally new to Flash, there are tons of resources available. Over the years, I’ve read dozens of books and visited hundreds of sites. So, I decided to put together a single page with many of my favorite Flash learning links. Enjoy!

E4X ‘Gotcha’ With XML in Actionscript 3

Justin | ActionScript,tips | Wednesday, April 1st, 2009

Oftentimes, I like to trace pieces of data as I’m programming just to make sure everything is on track. When you’re trying to trace data using E4X (XML in Actionscript 3), don’t forget the toXMLString() function. In many cases, you won’t see anything if you forget to call this function. Your code will see the data just fine, but you might not think it’s working and spend time trying to diagnose a non-existent problem.

trace(xml.children()[0]) //empty trace
trace(xml.children()[0].toXMLString()) //now we see it!

stage.width vs. stage.stageWidth in Actionscript 3

Justin | ActionScript,tips | Wednesday, March 18th, 2009

Careful with this one. It’s easy to miss if you’re accustomed to Actionscript 1 or 2.

Stage Width Example

stage.width will return the width of the content on the stage and ignore any empty pixels around the edges. So if you only have a 100 px wide rectangle on stage, your stage.width will be 100.

stage.stageWidth will give you the size of the stage, more like Stage.width in Actionscript 2. Use stage.stageWidth if you’re trying to position elements relative to the stage.

Same goes for stage.height and stage.stageHeight.

Page 1 of 3123