Hopefully this is a quick one - I haven't touched flash since cs3 and the following jsfl typewriter effect use to work. I'm not sure if there is a bug but in CS6 the effect actually works backwards - as if it has reversed the selection? The last letters animate in first instead of the first animating in.
Does anyone know of a solution? JSFL below
var doc = fl.getDocumentDOM();
doc.breakApart();
doc.distributeToLayers();
doc.selectAll();
var obs = doc.selection;
doc.getTimeline().insertFrames( obs.length * 2, true, 1);
var tl = doc.getTimeline();
var total = obs.length;
var i = total + 1;
while( i-- ){
tl.setSelectedLayers( i, true );
tl.cutFrames(0);
tl.pasteFrames( i * 2 );
tl.clearFrames(0, (i * 2));
}
Maybe the order in which distribute to layers works has reversed at some point. In any case, simply inverting the layer selection works for me:
tl.setSelectedLayers( total - i, true );