Hi,
Here is an example that clears all keyframes at the current frame:
(function(){
var isKeyFrame = function( fr, fn ){
return ( fr.startFrame === fn );
};
var doc = fl.getDocumentDOM(),
tml = doc.getTimeline(), i, xframe,
cf = tml.currentFrame, cf1 = cf + 1,
tmlSel = [];
for( i = 0; i < tml.layers.length; i++ ){
xframe = tml.layers[ i ].frames[ cf ];
if( ! xframe ) continue;
if( ! isKeyFrame( xframe, cf ) ) continue;
tmlSel.push( i, cf, cf1 );
}
tml.setSelectedFrames( tmlSel, true );
tml.clearKeyframes();
})();
- Vlad: UX and graphic design, Flash user since 1998Member of Flanimate Power Tools team - extensions for character animation