按顺序对多个元素应用效果

时间:2011-11-02 18:46:07

标签: flex move effect sequential

我正在尝试对多个元素应用Move-Effect。他们一起搬家,但我更喜欢它。

<s:Move id="thumbMover" target="{thumb}"/>

private function addItemThumbs ( ) : void {
    for each ( var item : ItemVO in _items ) {
        thumb = new Thumb;
        thumb._item = item;
        thumbMover.createInstance(thumb);
        thumbMover.xFrom = stage.width;
        thumbMover.yFrom = stage.height;
        thumbMover.xTo = xValue;
        thumbMover.yTo = yValue;
        thumbMover.play();
        addElement(thumb);
        xValue = xValue + item.itemTnW + Config.getInstance().vBorderItm;
        if ( xValue >= stage.width - item.itemTnW - 200 ) {
            xValue = Config.getInstance().xValueItm;
            yValue = yValue + item.itemTnH + Config.getInstance().hBorderItm;
        }
    }   
}

感谢您抽出宝贵时间!

马克

1 个答案:

答案 0 :(得分:0)

使用序列。更多信息:http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fab.html

这样的东西
<s:Sequence>
   <s:Move />
   <s:Move />
</s:Sequence>