将官方的例子改为:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:distortion="view.distortion.*"> <distortion:SimpleFlip width="100%" height="100%"/> <!--<distortion:SimpleFlip /> <distortion:SimpleManualFlip /> <distortion:SimpleFlipHideEffect /> <distortion:SimpleFlipTransition /> <distortion:DistortionLab /> <distortion:ViewStack3D /> <distortion:Skins3D />--> </mx:Application>
SimpleFlip.mxml中的相关代码改为:
<mx:ViewStack id="loginViewStack" width="100%" height="100%"> <mx:Canvas id="login" click="flipToRegistration()" borderStyle="solid"> <mx:Button label="aaaaaaaaaa" x="96" y="116"/> </mx:Canvas> <mx:Canvas id="registration" click="flipToLogin()" borderStyle="solid"> <mx:Button label="aaaaaaaaaa" x="71" y="78"/> </mx:Canvas> </mx:ViewStack>
那么,在点击按钮切换一次后,最大化或还原浏览器,bug就出现了:出现了两个按钮。
当
<distortion:SimpleFlip width="100%" height="100%"/>
的width 和 height 不是%时,不会出现bug。
待解决。。。。。。