从Flash导出动画数据? [英] Export animation data from flash?
本文介绍了从Flash导出动画数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从专业的Adobe Flash我可以导出动画的数据吗?像序列中的x和y坐标以及旋转值各个图像
From Pro Adobe flash can I export an animation's data? Like the x and y coordinates and rotation values for individual images in a sequence.
推荐答案
您可以右键点击一个运动补间实例,或者在时间轴中的补间,并选择动作复制为ActionScript 3.0
You can right click on a motion-tweened instance, or on a tween in the Timeline, and select Copy Motion as ActionScript 3.0.
然后,您有这样的事情在你的剪贴板:
You'll then have something like this in your clipboard:
import fl.motion.AnimatorFactory;
import fl.motion.MotionBase;
import fl.motion.Motion;
import flash.filters.*;
import flash.geom.Point;
var __motion_Symbol1_2:MotionBase;
if(__motion_Symbol1_2 == null) {
__motion_Symbol1_2 = new Motion();
__motion_Symbol1_2.duration = 24;
// Call overrideTargetTransform to prevent the scale, skew,
// or rotation values from being made relative to the target
// object's original transform.
// __motion_Symbol1_2.overrideTargetTransform();
// The following calls to addPropertyArray assign data values
// for each tweened property. There is one value in the Array
// for every frame in the tween, or fewer if the last value
// remains the same for the rest of the frames.
__motion_Symbol1_2.addPropertyArray("x", [0]);
__motion_Symbol1_2.addPropertyArray("y", [0]);
__motion_Symbol1_2.addPropertyArray("scaleX", [1.000000]);
__motion_Symbol1_2.addPropertyArray("scaleY", [1.000000]);
__motion_Symbol1_2.addPropertyArray("skewX", [0]);
__motion_Symbol1_2.addPropertyArray("skewY", [0]);
__motion_Symbol1_2.addPropertyArray("rotationConcat", [0]);
__motion_Symbol1_2.addPropertyArray("cacheAsBitmap", [false]);
// Create an AnimatorFactory instance, which will manage
// targets for its corresponding Motion.
var __animFactory_Symbol1_2:AnimatorFactory = new AnimatorFactory(__motion_Symbol1_2);
__animFactory_Symbol1_2.transformationPoint = new Point(0.500000, 0.499773);
// Call the addTarget function on the AnimatorFactory
// instance to target a DisplayObject with this Motion.
// The second parameter is the number of times the animation
// will play - the default value of 0 means it will loop.
// __animFactory_Symbol1_2.addTarget(<instance name goes here>, 0);
}
这篇关于从Flash导出动画数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文