开发者

flash record and playback movieclips

开发者 https://www.devze.com 2023-02-01 21:47 出处:网络
My goal is to make a replay f开发者_Go百科unction: I have to \"record\" 3 moviesclips movements for N seconds and play them back.

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!

0

精彩评论

暂无评论...
验证码 换一张
取 消