Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在XML中更改坐标的电影剪辑_Xml_Actionscript 3_Flash_Animation_Movieclip - Fatal编程技术网

在XML中更改坐标的电影剪辑

在XML中更改坐标的电影剪辑,xml,actionscript-3,flash,animation,movieclip,Xml,Actionscript 3,Flash,Animation,Movieclip,我已从timeline复制了此xml: private function move(function_mc:MovieClip, cx:Number, cy:Number){ var move_xml:XML = <Motion duration="40" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*"> <source&g

我已从timeline复制了此xml:

private function move(function_mc:MovieClip, cx:Number, cy:Number){
        var move_xml:XML = <Motion duration="40" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">
                <source>
                    <Source frameRate="24" x="0" y="0" scaleX="1" scaleY="1" rotation="0" >
                        <dimensions>
                            <geom:Rectangle left="0" top="0" width="23" height="23"/>
                        </dimensions>
                        <transformationPoint>
                            <geom:Point x="0" y="0"/>
                        </transformationPoint>
                    </Source>
                </source>

                <Keyframe index="0" tweenSnap="true">
                    <tweens>
                        <CustomEase>
                            <geom:Point x="0.2308" y="1"/>
                            <geom:Point x="0.9524" y="0.9524"/>
                        </CustomEase>
                    </tweens>
                </Keyframe>

                <Keyframe index="39" x={cx} y={cy} />
            </Motion>;

            move_animator = new Animator(move_xml, function_mc);
            move_animator.play();
}
我想要的是,当我单击“特定”按钮时,将此功能用于更多电影剪辑。但是每个电影剪辑都有不同的开始和结束坐标。我尝试发送cx和cy,例如cx=20,cy=0,但每次单击按钮时,它只会在x轴上移动电影剪辑。但是我想在坐标x=20和y=0上发送电影剪辑。当我再次单击同一个按钮时,它将保持在x=20和y=0。有办法吗? 或者任何其他解决方案,如何为不同的电影剪辑重用动画并将其发送到不同的坐标? 谢谢你的帮助