JSFL: How do you align an object to center stage?
I've been trying to put together a command that to have a custom way to reduce the scale of my object, and additionally have that center to the middle of the stage. However that's where I fall flat, and I get the error:
"Error: 'align' requires a selection"
Here's what I have so far:
var doc = fl.getDocumentDOM();
doc.getTimeline().setFrameProperty('tweenType', 'none'); //removes tweens from selected layer
doc.getTimeline().clearKeyframes(2, 5000); // removes keyframes from frame 2 and onward
var num1 = window.prompt("What Scale Value? Example: 50 to reduce, 100 to remain unchanged")*0.01; //custom reduce scale
doc.setTransformationPoint({x:000, y:000});
doc.scaleSelection(parseFloat(num1), parseFloat(num1));
doc.align('horizontal center', true); //align to center stage
doc.align('vertical center', true);
I'm not sure how to tell Animate it's already got the right selection, am I'm missing additional syntax? Thanks for the two cents
