从flash导出动画数据?

从flash导出动画数据?,flash,animation,Flash,Animation,我可以从Pro Adobe flash导出动画数据吗?类似于序列中单个图像的x和y坐标和旋转值。您可以右键单击运动中间层实例或时间轴中的中间层,然后选择将运动复制为ActionScript 3.0 然后,您的剪贴板中会出现如下内容: import fl.motion.AnimatorFactory; import fl.motion.MotionBase; import fl.motion.Motion; import flash.filters.*; import flash.geom.Po

我可以从Pro Adobe flash导出动画数据吗?类似于序列中单个图像的x和y坐标和旋转值。

您可以右键单击运动中间层实例或时间轴中的中间层,然后选择将运动复制为ActionScript 3.0

然后,您的剪贴板中会出现如下内容:

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);
}
导入fl.motion.AnimatorFactory;
导入fl.motion.MotionBase;
导入fl.motion.motion;
进口闪光滤光片。*;
导入flash.geom.Point;
变量(运动)符号1(运动2):;
如果(uuu运动_u符号1_u2==null){
__运动\符号1 \ 2=新运动();
__运动Symbol1\u 2.持续时间=24;
//调用overrideTargetTransform以防止缩放、倾斜、,
//或相对于目标创建的旋转值
//对象的原始变换。
//_uu运动_符号1_2.重写GetTransform();
//以下对addPropertyArray的调用将分配数据值
//对于每个tweed属性。数组中有一个值
//对于中间的每一帧,如果最后一个值
//其余帧保持不变。
__议案_Symbol1 _2.添加属性数组(“x”[0]);
__议案_Symbol1 _2.添加属性数组(“y”[0]);
__议案_Symbol1 _2.addPropertyArray(“scaleX”[1.000000]);
__议案_Symbol1 _2.addPropertyArray(“scaleY”[1.000000]);
__议案_Symbol1 _2.addPropertyArray(“skewX”[0]);
__运动_Symbol1_2.addPropertyArray(“歪斜”[0]);
__运动符号1.addPropertyArray(“rotationConcat,[0]);
__motion_Symbol1_2.addPropertyArray(“cacheAsBitmap”,[false]);
//创建一个AnimatorFactory实例,该实例将管理
//其相应运动的目标。
var uuu animFactory_Symbol1_2:AnimatorFactory=新的AnimatorFactory(uuu motion_Symbol1_2);
__animFactory_Symbol1_2.transformationPoint=新点(0.500000,0.499773);
//在AnimatorFactory上调用addTarget函数
//实例以此运动的DisplayObject为目标。
//第二个参数是动画的次数
//将播放-默认值0表示将循环播放。
//添加目标(,0);
}