简体   繁体   中英

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. 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?

Target platform: any version of Flash/Flex/Air.

What you want to do is what tweenMax was made for. it's a .swc that you add into your project. It will allow you to use the tweenLite (or tweenMax) command.

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. Add the child at maybe 505, and then tween.to whatever x value you want. Yep. it's that easy. And the other parameters are for duration and easing and even alpha so you have control over that too. They even have a swf in the website so you an play with it and practice. 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":

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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