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

SmartMouthRT (Real-Time) Lipsyncing Preview

Justin | ActionScript,animation,Flash | Thursday, May 10th, 2012

Ever since our SmartMouth auto-lipsyncing Flash extension was released, people have been asking about lipsyncing in real time…Well, we’re getting pretty close to having such a product ready for purchase. SmartMouthRT is an easy-to-use ActionScript 3 library that allows for on-the-fly lipsyncing. With Adobe’s packaging utilities for Android and iOS (iPhone/iPad), SmartMouthRT could easily be used for mobile apps as well. We’ve put a little demo video together to show you what it’s all about, which includes behind-the-scenes footage of the assets and code used to make the demo.

Voices: Betsie Bush and Peter Yearsley (librivox.org)
Music: Baby, Please Don’t Go by Big Bill Broonzy

We don’t have an exact release date available. I’m hoping it will be in the next 1-3 months. The SmartMouthRT SDK (Software Developer’s Kit) will be priced to reflect its greater flexibility beyond that of the Flash Extension. The first release will analyze essentially any (and all) sound playing within the Flash Player. Future releases will likely include the ability to target specific sound objects (i.e., for multiple simultaneous characters) as well as microphone objects.

Want an email when SmartMouthRT is available? Subscribe to our newsletter.

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.

MotionBrush: Free Actionscript Class

Justin | ActionScript,Tutorials | Saturday, May 2nd, 2009

One idea that I had when creating the MotionSketch extension was that it could be used to do write-on effects. I was going to write an Actionscript class to demo this effect prior to releasing MotionSketch but ran out of time. So I tweaked a version of vCam to quickly demo the effect for the MotionSketch video tutorial. Thanks to a reader’s email, I was reminded that I still had yet to write this class. It’s now written and free to download. I’m calling it MotionBrush to keep it in the family with MotionSketch and MotionBlur. It’s super simple to use. Check out the video tutorial:


Download
MotionBrush.zip

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!

Reduce Flash File Size by Drawing with Actionscript

Justin | ActionScript,Flash,Photoshop,Tutorials | Sunday, March 29th, 2009

Thanks to a generous donation, I’ve picked up a much nicer video capture application. This video tutorial shows how to translate Photoshop graphics into Actionscript using the AS3 drawing API. The resulting SWF file size is minuscule: from a 100kb Photoshop-to-Flash import to a 5kb file with some coding. I start with the most basic aspects and work up to the more complex: from a basic rectangle, to patterns from Photoshop, to complex gradients.

I’m pretty happy with this new software, so I’ll try to post more videos. Still working on getting better resolution out of the video host though…

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 212