Copy link to clipboard
Copied
Is there a way to select a span or series of frames and see how many frames it is without having to do the math from the frame numbers?
If not, that would be a handy feature. Maybe something in the tweening properties. Or, an info strip above each layer that you could show or hide that would give the duration between each keyframe, like a timing chart.
Copy link to clipboard
Copied
Hi.
Right now, you can achieve this by using a JSFL script.
Paste the code below into a file named Get Selected Frames Length.jsfl.
Get Selected Frames Length JSFL code:
var dom, timeline, frames, i, min, max, length, startFrames, endFrames;
function main()
{
dom = fl.getDocumentDOM();
if (!dom)
{
alert("Please open up a FLA file first.");
return;
}
timeline = dom.getTimeline();
frames = timeline.getSelectedFrames();
if (frames.length === 0)
{
alert("There are no frames selected.");
return;
}
startFrames = [];
endFrames = [];
for (i = 1; i < frames.length; i += 3)
{
startFrames.push(frames[i]);
endFrames.push(frames[i + 1]);
}
min = Math.min.apply(Math, startFrames);
max = Math.max.apply(Math, endFrames);
length = max - min;
fl.trace(length); // traces de value in the Output panel
}
main();
To run the script, do one of the following:
- Double-click it (the .jsfl file);
- Drag and drop the .jsfl file over the Animate IDE
- Go to Commands > Run Command.... (you must put the script in the commands folder). You can also assign a shortcut for the command.
Source / file (if you want to download the file instead of create one yourself):
https://github.com/joao-cesar/adobe/tree/master/animate%20cc/jsfl/get_selected_frames_length
The length of the selection will be displayed in the Output panel.
You can also suggest this feature to the team here:
https://www.adobe.com/products/wishform.html
I hope it helps.
Regards,
JC