This is the first extension that I’ve written exclusively for the new Flash CS4 features. Flash CS4 not only allows you to create extremely complex animations with a high level of control, but it also allows you to save those animations for reuse in the new Motion Preset panel.
I got the idea for this extension from Lee Brimelow’s excellent tutorial on the Motion Preset panel. Since I imagine that I’ll be creating a lot of my own motion presets, and I’d like them to have live previews just like the default presets, I decided to automate the process.
Here’s how it works:
Once you’ve created a custom motion preset, you can use this command to immediately create a live preview from your current document. This assumes that the motion preset is the only thing in your document. If that’s not the case, you may want to open a new document, paste the animation, and run the command from there.
Feedback welcome.
UPDATE:
- Version 1.1.0 now supports multiple languages. Thanks to jeanphilippe for the catch!
- Know issue: Preview is not retained if the preset is moved to a different folder within the Motion Preset panel. This is because Flash does not keep track of the preview files, it just knows to look for them.
Download
(compatibility: Flash CS4 and later, including CC and CC 2014)
Export as Motion Preset Preview.zip
Get updates from Ajar Productions

Sign up today and get the InDesign Split Text premium extension for free!
Hi,
have you tested on Mac ?
’cause i’ve an error in line 31
thanks
JP
oups !
it’s normal under a Flash CS4 french language version
the good code for french users is :
//Export as Motion Preset Preview
//Justin Putney
//http://putney.ajarproductions.com
//version 1.0.0
var dom = fl.getDocumentDOM();
var sel = fl.presetPanel.getSelectedItems();
if(sel.length == 1) run();
else if(sel.length > 1) alert (”You have more than 1 preset selected.”);
else if (sel.length < 1) alert (”You must select a motion preset first.”);
function run(){
var sItem = sel[0];
//check to make sure it’s not a folder
if(sItem.isFolder){
alert(”Please select a preset and not a folder.”);
return;
}
//check to make sure it’s not a default
if(sItem.isDefault){
alert(”This cannot be applied to a default preset.”);
return;
}
fl.trace(sItem.path);
var pathArr = sItem.path.split(”/”);
if(pathArr[0] == “Présélections personnalisées”) pathArr.shift();
pathArr.unshift(”Motion Presets”);
var fileName = pathArr.join(”/”) + “.swf”;
var swfFile = fl.configURI + fileName;
//export swf
dom.exportSWF(swfFile, true);
//refresh panel
fl.presetPanel.selectItem(sItem.path, true, false);
fl.presetPanel.selectItem(sItem.path, true);
}
Thanks for the catch and fix, jeanphilippe! The language variations in folder names was not something I had anticipated. I’ll check to see if there’s a way to get that information automatically and/or make it language non-specific.
Thanks Justin 🙂
Okay, I think I’ve got it fixed. Try version 1.1.0.
Oh my god ! it’s universal now !
no way… your new version is great now
thanks a lot for us !
Great stuff, thanx!
It’s amazing, Thanks
Very nice, Justin!
thanx alot.. !!
it’s amazing & helps alot …
thank u justin
Thank you Justin, this is so much easier than copying the swf over. Very much appreciated!
sorry guys, but it seems like i dont understand how this works
now i downloaded that “gray” file
but i dont know what to do next
so if anyone has patience to give me detailed instructions to what to do, i would be grateful
Tarek,
Not sure what you mean by the “gray” file. Could you clarify?
*ref Ajar productions / Flash
http://ajarproductions.com/blog/2008/10/16/flash-extension-export-as-motion-preset-preview/
Thank you very much…
WOW!
very nice job!
Thanks, Jesus!