Copy link to clipboard
Copied
Hi! I have animation with a lot of moving parts and while applying classic tween all thoose parts obviously rotating over transformation point which I changed while animating. Is there a way to change transformation point in all frames at once or force classic tween to use registration point?
1 Correct answer
Hi.
1 - Download this JSFL script file:
animate_cc_jsfl_reset_transformation_points.zip - Google Drive
[Reset Transformation Points JSFL code for reference only:]
...function main()
{
var doc = an.getDocumentDOM();
var selectionq;
if (!doc)
{
alert("Open a document first.");
return;
}
selection = doc.selection;
if (doc.selection.length == 0)
{
alert("Select one or more objects.");
return;
}
doc.selectNone();
for (var i = selection.length
Copy link to clipboard
Copied
Hi.
1 - Download this JSFL script file:
animate_cc_jsfl_reset_transformation_points.zip - Google Drive
[Reset Transformation Points JSFL code for reference only:]
function main()
{
var doc = an.getDocumentDOM();
var selectionq;
if (!doc)
{
alert("Open a document first.");
return;
}
selection = doc.selection;
if (doc.selection.length == 0)
{
alert("Select one or more objects.");
return;
}
doc.selectNone();
for (var i = selection.length - 1; i >= 0; i--)
{
var element = selection;
element.selected = true;
doc.setTransformationPoint({x:0, y:0});
element.selected = false;
}
}
main();
2 - Inside of Animate CC, enter the Edit Multiple Frames mode (Alt + Shift + E);
3 - Select all objects you wish to reset the Transformation Point;
4 - Run the script by double-clicking it, dragging and dropping over Animate IDE or by going to Commands > Run Command....
I hope this helps.
Regards,
JC
Copy link to clipboard
Copied
THANK YOU SO MUCH! You saved me thousands of hours! I think I have to start learning how to do scripts. And again, THANK YOU!!!
Copy link to clipboard
Copied
You're welcome!
If you want to start learning JSFL and extensions in general, please visit these links when you have the time:
https://help.adobe.com/archive/en_US/flash/cs5/flash_cs5_extending.pdf
Adobe Animate custom SDK and API | Adobe I/O https://www.adobe.io/apis/creativecloud/animate.html
GitHub - Adobe-CEP/Getting-Started-guides: Getting Started guides and samples for CEP extensions
Regards,
JC
Copy link to clipboard
Copied
That link is not working any more 😕
Copy link to clipboard
Copied
Hi.
You can just copy and paste the script into a text file and save it with a .jsfl extension.
Please let us know if you need further assistance.
Regards,
JC
Copy link to clipboard
Copied
For some reason is not working for me. I followed that exact instruction.
Copy link to clipboard
Copied
Hi.
Gemini fixed it,It works for me.
function main() {
var doc = fl.getDocumentDOM();
var selection;
if (!doc) {
fl.alert("Open a document first.");
return;
}
selection = doc.selection;
if (selection.length == 0) {
fl.alert("Select one or more objects.");
return;
}
for (var i = selection.length - 1; i >= 0; i--){
var element = selection[i];
element.transformationPoint = { x: 0, y: 0 };
element.selected = false;
}
}
main();

