Two-way Bindings
Binding between two properties in Flex 4 is insanely easy now. Instead of just using “{}”, now you can add an @ to make it go both ways: “@{}”. In this example, you’ll see the @ in the text property of the second TextArea which will two-way bind with the text property of the first TextArea.
You can test this out by typing the the two TextAreas below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" > <s:layout> <s:VerticalLayout/> </s:layout> <s:TextArea id="firstTextField" width="100%" height="50%" fontSize="20" /> <s:TextArea id="secondTextField" text="@{firstTextField.text}" width="100%" height="50%" /> </s:Application> |
Flex 4 Layouts
This video covers how to use the new layouts in Flex 4 as well as how to create custom layouts
Click to view the video in a pop-up. Right-click and “save as” to download the video to your hard drive.
Watch Flex 4 Layouts Video Tutorial
Flex 4 States
I’m going on a bit of a Flex 4 kick this week so I decided to put out a few video tutorials on the new features of Flex 4 and FlashBuilder. Tonight’s video covers the changes to Flex 4 states.
Click to view the video in a pop-up. Right-click and “save as” to download the video to your hard drive.
Watch Flex 4 States Video Tutorial
After watching the video, try out the new states markup on the Application backgroundColor style
Welcome to Flex4.org
Hi, it’s me, John Lindquist, from pv3d.org. I’ve been doing a lot of Flex at work recently, so I decided to share what I know here. Enjoy.
Search
Recent Posts
Recent Comments
- chd on Flex 4 Layouts
- Djam on Flex 4 Layouts
- Brakxel on Flex 4 Layouts
- Flex 4 Resources – Samples and Links! « Devgirl’s Weblog on Flex 4 Layouts
- reledev on Flex 4 Layouts
