Flex页面翻转效果
程序员文章站
2024-03-24 11:16:04
...
首先你应该往你的Project里放一个SWC文件。在本文的附件里。
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:viewStackEffects="org.efflex.mx.viewStackEffects.*" xmlns:local="*">
<mx:Script>
<![CDATA[
private function abcd():void
{
vs1.selectedIndex=1;
}
private function dcba():void
{
vs1.selectedIndex=0;
}
]]>
</mx:Script>
<viewStackEffects:FlipPapervision3D id="effect1" transparent="true" />
<mx:ViewStack id="vs1" width="400" height="300" x="25" y="22">
<mx:Panel title="1" height="100%" width="100%" hideEffect="effect1" showEffect="effect1" />
<mx:Panel title="2" height="100%" width="100%" hideEffect="effect1" showEffect="effect1"/>
</mx:ViewStack>
<mx:Button label="1" click="abcd()" x="455" y="88"/>
<mx:Button label="2" click="dcba()" x="503" y="88"/>
</mx:Application>