2014-08-30 32 views
0

我的项目有靠右侧面板:如何将转移应用到左对齐元素?

<s:BorderContainer id="panelRight" right="0" top="60" bottom="30" width="333"> 

当我执行该代码

move.target = panelRight; 
move.xBy = +panelRight.width; 
move.play(); 

什么也没有发生:这是因为panelRighti saligned到吧!

我该如何解决这个问题?

回答

0

您可以使用Animate类代替Move,并且不会为x添加效果,但right属性不会添加效果。它会是这样的:

var moveEffect:Animate = new Animate(); 
moveEffect.target = panelRight; 
moveEffect.motionPaths = Vector.<MotionPath>([new SimpleMotionPath("right", null, null, -panelRight.width)]); 
moveEffect.play(); 

效果看起来是一样的。

Animate class

相关问题