<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:eff="com.adobe.ac.mxeffects.*"
paddingBottom="0" paddingLeft="0" paddingTop="0" paddingRight="0"
horizontalAlign="center" verticalAlign="middle" xmlns="*" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import com.adobe.ac.mxeffects.Gate;
import com.adobe.ac.mxeffects.Flip;
import mx.effects.Sequence;
import mx.effects.Parallel;
import mx.effects.Resize;
import mx.effects.Fade;
import mx.effects.Iris;
import com.adobe.ac.mxeffects.DistortionConstants;
private const min_width:int = 350;
private const min_height:int = 200;
public function gotoChatRoom() : void {
var mySequence:Sequence = new Sequence();
var gate:Gate = new Gate(login);
gate.siblings = [ chatRoom ];
gate.direction = DistortionConstants.LEFT;
gate.smooth = true;
gate.distortion = 10;
gate.mode = Gate.OPEN;
gate.duration = 1000;
mySequence.addChild(gate);
var parallel:Parallel = new Parallel();
var resize:Resize = new Resize();
resize.target = loginStack;
resize.widthTo = this.width-20;
resize.heightTo = this.height-20;
resize.duration = 1000;
parallel.addChild(resize);
resize = new Resize();
resize.target = chatRoom;
resize.widthTo = this.width-20;
resize.heightTo = this.height-20;
resize.duration = 1000;
parallel.addChild(resize);
mySequence.addChild(parallel);
mySequence.play();
}
public function gotoLogin() : void {
var mySequence:Sequence = new Sequence();
var gate:Gate = new Gate(chatRoom);
gate.siblings = [ login ];
gate.direction = DistortionConstants.LEFT;
gate.smooth = true;
gate.distortion = 10;
gate.mode = Gate.CLOSE;
gate.duration = 1000;
mySequence.addChild(gate);
var parallel:Parallel = new Parallel();
var resize:Resize = new Resize();
resize.target = loginStack;
resize.widthTo = min_width;
resize.heightTo = min_height;
resize.duration = 1000;
parallel.addChild(resize);
resize = new Resize();
resize.target = chatRoom;
resize.widthTo = min_width;
resize.heightTo = min_height;
resize.duration = 1000;
parallel.addChild(resize);
mySequence.addChild(parallel);
mySequence.play();
}
]]>
</mx:Script>
<mx:Style source="/assets/OSX.css"/>
<mx:VBox>
<mx:ViewStack id="loginStack" width="350" height="200">
<mx:Panel id="login" title="Login" horizontalAlign="center"
verticalAlign="middle" backgroundColor="0xAAAAAA" >
<mx:Form >
<mx:FormItem label="Username">
<mx:TextInput id="userName" />
</mx:FormItem>
<mx:FormItem label="Password">
<mx:TextInput displayAsPassword="true" id="password"
enter="gotoChatRoom();"/>
</mx:FormItem>
<mx:FormItem>
<mx:Button label="Login" click="gotoChatRoom();" />
</mx:FormItem>
</mx:Form>
</mx:Panel>
<mx:Panel id="chatRoom" title="Chat Room" >
<mx:VBox width="100%" height="100%">
<mx:TextArea id="log" fontSize="12" width="100%" height="100%"
editable="false" />
</mx:VBox>
<mx:ControlBar>
<mx:TextInput id="msg" width="100%" fontSize="12" enter=""/>
<mx:Button label="Send" click="" />
<mx:Button label="Logout" click="gotoLogin()" />
</mx:ControlBar>
</mx:Panel>
</mx:ViewStack>
</mx:VBox>
</mx:Application>
分享到:
相关推荐
这个“Flex开门,关门,翻转,效果”是一个展示Flex在动态UI交互方面强大能力的例子。在这个项目中,开发者可能利用了Flex的动画和图形渲染功能来创建出一种视觉上吸引人的用户体验。 首先,我们来看看“开门”和...
《Flex开门效果详解》 在IT领域,用户体验是至关重要的,而动态的视觉效果往往能提升用户对软件或网站的满意度。"Flex开门效果"就是这样一种设计,它以灵活、优雅的方式模拟了门开启的动作,为用户带来独特的交互...
3. **水波纹**:水波纹特效模拟水面波动的效果,常用于创建动态背景或交互式界面元素。在Flex中,开发者可能通过编程生成一系列动态的图形形状,模拟波浪起伏,或者使用物理模拟库来模拟水体的行为,如` ...
这个"Flex开关门效果 特效"是利用Flex技术实现的一种动态视觉效果,通常用于增强用户界面的交互性和吸引力。下面我们将深入探讨Flex中的开关门效果,以及如何使用Flex实现这种特效。 首先,开关门效果是一种模拟...
描述中提到的学习和新技术,暗示了Flex开门特效是当前技术领域中一种创新的视觉表现手法。这种特效不仅能够吸引用户的注意力,还展示了开发者对于交互设计的理解和技术的掌握。 在Flex中,实现开门特效可能涉及到...
3. 3D旋转(3D Rotation):Flex支持在二维和三维空间内的旋转效果,通过使用如Transform3D类和rotate3D方法,可以创建出立体的视觉效果。这在设计现代、动态的用户界面时非常有用。 4. 插件(Plug-ins):压缩包中...
在本文中,我们将深入探讨如何使用Flex实现立方体旋转和其他特效,如翻页和开门关门效果。Flex是一种基于ActionScript的框架,常用于构建富互联网应用程序(RIA),它提供了强大的布局管理和动画功能。 首先,我们...