flex的bug?求大神给解释!

flex中,编译如下代码。快速的点击按钮之后,发现按钮的位置居然移动了!!

谁能给解释不?

这是初始效果: 这是点击按钮之后的效果:


1 <?xml version="1.0" encoding="utf-8"?>
2  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
3 viewSourceURL="src/ControlsButtonBased/index.html"
4 width="460" height="314" paddingLeft="30" paddingRight="30"
5 layout="vertical"
6 >
7
8 <!-- Define effects -->
9 <mx:Zoom id="shrink" duration="10" zoomHeightTo=".5" zoomWidthTo=".5" />
10 <mx:Zoom id="revert" duration="1000" zoomHeightTo="1" zoomWidthTo="1" />
11
12 <mx:Panel
13 title="Bouncy Button" paddingTop="10" paddingBottom="10"
14 paddingLeft="10" paddingRight="10" autoLayout="false"
15 width="247" height="157">
16 <!-- Assign effects to target -->
17 <mx:Button id="bouncyButton" label="Click me!"
18 mouseDown="showMessage()" mouseDownEffect="{shrink}" mouseUpEffect="{revert}"/>
19 <mx:Label text="Label" id="message" width="100%"/>
20
21 </mx:Panel>
22 <mx:Script>
23 <![CDATA[
24 private function showMessage():void
25 {
26 message.text = bouncyButton.getVisibleRect().toString();
27 }
28 ]]>
29 </mx:Script>
30 </mx:Application>
31
32

 

posted @ 2010-09-12 20:17  mongg  阅读(208)  评论(0)    收藏  举报