按顺序对多个元素应用效果
我正在尝试对多个元素应用移动效果。他们一起移动,但我更喜欢按顺序移动。
<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;
}
}
}
感谢您抽出时间!
马克
I'm trying to apply a Move-Effect on multiple elements. They are moving all together but I prefer it in seqeunce.
<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;
}
}
}
Thanks for taking time!
Marc
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用序列。更多信息请参见:http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fab.html
类似的东西
Use a sequence. More info here: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fab.html
Something like