简体   繁体   English

使用Flex创建的Air应用程序-如何在左侧/右侧创建弹出窗口

[英]Air application created with Flex - How do I create a fly-out window to the left/right

I have an Air application with a main window. 我有一个带有主窗口的Air应用程序。 I would like to have a new window fly out from the side of the main window when the user clicks on a button in the main window. 当用户单击主窗口中的按钮时,我希望有一个新窗口从主窗口的侧面飞出。 The window that appears needs to display information based on value passed from the main form. 出现的窗口需要显示基于从主表单传递的值的信息。 How can I achieve this with Flex Builder 3? 如何使用Flex Builder 3实现这一目标?

Target platform: any version of Flash/Flex/Air. 目标平台:Flash / Flex / Air的任何版本。

What you want to do is what tweenMax was made for. 您想要做的是tweenMax的用途。 it's a .swc that you add into your project. 这是您添加到项目中的.swc。 It will allow you to use the tweenLite (or tweenMax) command. 它将允许您使用tweenLite(或tweenMax)命令。

import com.greensock.*;
TweenLite.to(mc, 1, {x:65, y:117});

So you would say if your stage was 500 px wide and you want the box to come in from the right. 因此,您会说,如果您的舞台宽度为500 px,并且您希望框从右侧进入。 Add the child at maybe 505, and then tween.to whatever x value you want. 将孩子添加到505,然后将tween。添加到所需的任何x值。 Yep. 是的 it's that easy. 就这么简单。 And the other parameters are for duration and easing and even alpha so you have control over that too. 其他参数用于持续时间和缓动甚至Alpha,因此您也可以对其进行控制。 They even have a swf in the website so you an play with it and practice. 他们甚至在网站上都有瑞士法郎,因此您可以尝试并练习。 http://www.greensock.com/tweenmax/ http://www.greensock.com/tweenmax/

You'll probably want to use view states. 您可能要使用视图状态。 Check out the Flex in one Week video tutorial on "Creating View States": 观看有关“创建视图状态”的Flex一周视频教程:

http://www.adobe.com/devnet/flex/videotraining/ http://www.adobe.com/devnet/flex/videotraining/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM