Apache flex Flex 4:我可以在同一平行线内设置多个对象的动画吗?

Apache flex Flex 4:我可以在同一平行线内设置多个对象的动画吗?,apache-flex,animation,flex4,Apache Flex,Animation,Flex4,我有多个旋转的球,我想一起制作动画。这是我到目前为止所做的,但是当我玩并行(spinning.play())时,什么都没有发生 我哪里做错了 <fx:Declarations> <fx:Vector id="kfP1" type="spark.effects.animation.MotionPath"> <s:MotionPath property="baseColor">

我有多个旋转的球,我想一起制作动画。这是我到目前为止所做的,但是当我玩并行(spinning.play())时,什么都没有发生

我哪里做错了

<fx:Declarations>                       
    <fx:Vector id="kfP1" type="spark.effects.animation.MotionPath">
        <s:MotionPath property="baseColor">
            <s:interpolator>
                <s:HSBInterpolator />
            </s:interpolator>
            <s:Keyframe time="0" value="0x9F9B9B" />
            <s:Keyframe time="250" value="0xFFFFFF" />
            <s:Keyframe time="500" value="0x9F9B9B" />
        </s:MotionPath>         
    </fx:Vector>
    <fx:Vector id="kfP2" type="spark.effects.animation.MotionPath">
        <s:MotionPath property="baseColor">
            <s:interpolator>
                <s:HSBInterpolator />
            </s:interpolator>
            <s:Keyframe time="125" value="0x9F9B9B" />
            <s:Keyframe time="375" value="0xFFFFFF" />
            <s:Keyframe time="625" value="0x9F9B9B" />
        </s:MotionPath>         
    </fx:Vector>
    <fx:Vector id="kfP3" type="spark.effects.animation.MotionPath">
        <s:MotionPath property="baseColor">
            <s:interpolator>
                <s:HSBInterpolator />
            </s:interpolator>
            <s:Keyframe time="250" value="0x9F9B9B" />
            <s:Keyframe time="500" value="0xFFFFFF" />
            <s:Keyframe time="750" value="0x9F9B9B" />
        </s:MotionPath>         
    </fx:Vector>
    <fx:Vector id="kfP4" type="spark.effects.animation.MotionPath">
        <s:MotionPath property="baseColor">
            <s:interpolator>
                <s:HSBInterpolator />
            </s:interpolator>
            <s:Keyframe time="375" value="0x9F9B9B" />
            <s:Keyframe time="625" value="0xFFFFFF" />
            <s:Keyframe time="875" value="0x9F9B9B" />
        </s:MotionPath>         
    </fx:Vector>
    <fx:Vector id="kfP5" type="spark.effects.animation.MotionPath">
        <s:MotionPath property="baseColor">
            <s:interpolator>
                <s:HSBInterpolator />
            </s:interpolator>
            <s:Keyframe time="500" value="0x9F9B9B" />
            <s:Keyframe time="750" value="0xFFFFFF" />
            <s:Keyframe time="1000" value="0x9F9B9B" />
        </s:MotionPath>         
    </fx:Vector>
    <fx:Vector id="kfP6" type="spark.effects.animation.MotionPath">
        <s:MotionPath property="baseColor">
            <s:interpolator>
                <s:HSBInterpolator />
            </s:interpolator>
            <s:Keyframe time="625" value="0x9F9B9B" />
            <s:Keyframe time="875" value="0xFFFFFF" />
            <s:Keyframe time="1125" value="0x9F9B9B" />
        </s:MotionPath>         
    </fx:Vector>
    <fx:Vector id="kfP7" type="spark.effects.animation.MotionPath">
        <s:MotionPath property="baseColor">
            <s:interpolator>
                <s:HSBInterpolator />
            </s:interpolator>
            <s:Keyframe time="125" value="0x9E9A9A" />
            <s:Keyframe time="750" value="0x9F9B9B" />
            <s:Keyframe time="1000" value="0xFFFFFF" />
            <s:Keyframe time="1125" value="0xCECCCC" />
        </s:MotionPath>         
    </fx:Vector>
    <fx:Vector id="kfP8" type="spark.effects.animation.MotionPath">
        <s:MotionPath property="baseColor">
            <s:interpolator>
                <s:HSBInterpolator />
            </s:interpolator>
            <s:Keyframe time="0" value="0xFFFFFF" />
            <s:Keyframe time="125" value="0x9E9A9A" />
            <s:Keyframe time="875" value="0x9F9B9B" />
            <s:Keyframe time="1125" value="0xFFFBFB" />
        </s:MotionPath>         
    </fx:Vector>

    <s:Parallel id="spinning" repeatCount="0" duration="1125"  >
        <s:Animate id="animateP1" motionPaths="{kfP1}" target="{p1}"/>
        <s:Animate id="animateP2" motionPaths="{kfP2}" target="{p2}"/>
        <s:Animate id="animateP3" motionPaths="{kfP3}" target="{p3}"/>
        <s:Animate id="animateP4" motionPaths="{kfP4}" target="{p4}"/>
        <s:Animate id="animateP5" motionPaths="{kfP5}" target="{p5}"/>
        <s:Animate id="animateP6" motionPaths="{kfP6}" target="{p6}"/>
        <s:Animate id="animateP7" motionPaths="{kfP7}" target="{p7}"/>
        <s:Animate id="animateP8" motionPaths="{kfP8}" target="{p8}"/>
    </s:Parallel>
</fx:Declarations>

查看Catalyst生成的并行程序的格式(有效),您似乎需要这样做(未选中)



在我看来这很奇怪,但这就是工具产生的结果

我使用了您的解决方案,但我也意识到,因为我使用的是路径和填充,所以我需要将id{p1}移动到solidfill,而不是路径。一旦我这样做,并改变属性,然后“颜色”它的工作。谢谢
<s:Parallel>
    <s:Parallel target = "{p1}">
        <s:Animate id="animateP1" motionPaths="{kfP1}"/>
   </s:Parallel>
    <s:Parallel target = "{p2}">
        <s:Animate id="animateP2" motionPaths="{kfP2}"/>
    </s:Parallel>
</s:Parallel>