My goal is to make a replay f开发者_Go百科unction: I have to "record" 3 moviesclips movements for N seconds and play them back.
Is there a library avaible to do it or a simple way ? Or do I need it from scratch ?
Regards
it should be enough creating an array with the properties of each movieclip, for each frame add this to the array:
recordArray.push ( mc.transform.matrix.clone() );
then when you're done recording, to play the thing back, simply do:
mc.transform.matrix = recordArray[index];
if you're doing other things than adjusting the position / scale / rotation of the mc, you will need to store that information as well!
精彩评论