Search:
Calendar:
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Subscribe:
Archives By Subject:
Adobe (33) [RSS]
AIR (7) [RSS]
Ajax (3) [RSS]
Buzzword (1) [RSS]
CFUG (42) [RSS]
ColdFusion (69) [RSS]
Flash (6) [RSS]
Flex (40) [RSS]
Frameworks (2) [RSS]
Free Software (2) [RSS]
FXUG (22) [RSS]
General (33) [RSS]
JpgMetadataReader (3) [RSS]
jQuery (1) [RSS]
Mac (2) [RSS]
Off Topic (13) [RSS]
OpenSource (14) [RSS]
PaperVision (10) [RSS]
Spry (2) [RSS]
Transfer (1) [RSS]
Tags:
Recent Entries:
Top Posts:
- [15497] Paper Vision 3D Sphere - Carousels on Steroids!
- [8159] Simple PaperVision3D Blurring example
- [7961] Carousel v0.2 - source code
- [7938] PaperVision3D/Flex2 Carousel v0.2
- [7908] Saving images from Flex using ColdFusion: Simple Example with source code
- [7807] PaperVision Carousel0.3 - one step closer to the master plan!
- [7470] Simple Dynamic Cursor Example in Flex2: With source code
- [7379] Simple PaperVision3D Blurring example : source code
- [6596] PaperVision3D is good for cubes! - a "geek" gift
- [5682] PaperVision, Flex2 and my daughter all playing together!
Recent Comments:
- ColdFusion and constants - how do you do them?
Ben Spencer said: Hi David, If you create a getConstants() method where you just set up a local var STRUCT with the ... [More] - ColdFusion and constants - how do you do them?
John Whish said: Hi Jim, you're right. David does mention that in the post. I read David's post when I posted my orig... [More] - ColdFusion and constants - how do you do them?
Jim Connor said: > I should point out that the THIS scope is a public property so can be set by code outside your ... [More] - ColdFusion and constants - how do you do them?
John Whish said: I should point out that the THIS scope is a public property so can be set by code outside your cfc. ... [More] - ColdFusion and constants - how do you do them?
Jim Connor said: We use the 'this' scope of the related cfc to store constants. I also use the C++ convention of maki... [More]
Top Commenters:
- [8] Campbell
- [8] Ben Nadel
- [6] Steve Bryant
- [6] Mark Flewellen
- [4] barry.b
- [4] Raymond Camden
- [3] John Whish
- [3] Peter Bell
- [2] carlos
- [2] riabook
My Links:
RSS:
Simple Effects on a Form - Flex Example
Lately I have been working on a Flex application and I have been enjoying the ease that the Flex framework allows a developer like me to add some nice looking effects very simply.
In my example I have a form, and this form has a Advanced mode which, when selected, will display extra fields for the user to fill in.
As you can see in the first application below, when you click the "Toggle Form" button the extra fields are shown or hidden.
The way I have done this is to create a private bindable variable called "advanced" which the extra fields bind too. When you click the "Toggle" button this value is changed from true to false or vice-a-versa as required.
The attributes of the form items that bind to that value are "visible", which controls if you can see the form field or not, and "includeInLayout" which lets Flex know if this field should be taken in to account when laying and rendering out the form.
By setting both of these to "false" the form field is hidden and the layout of the form changes.
Now, one thing about this is that the user gets know idea of the context of the fields.
EG: you start with "First Name", "Email" and "Password", and when you toggle to the advanced form, the "Last Name" field appears between the "First Name" and "Email" fields, and the 3 "Address" fields appear between the "Email" and "Password" Field.
So do give a feeling for the context I am going to add a "moveEffect" and a "showEffect" to each of the fields.
The Flex frame works ships with a library of these effects which are available to us. (See the docs for more info) We can build our own effects sequences, but that is another example entirely!
In to the "moveEffect" I am going to put the "Move" effect.
The "moveEffect" kicks in then the "x" or "y" positional properties are changed, and "Move" will move the UI component to that position, rather than just jump it there (as it does in my first example)
The "showEffect" happens when the "visible" property of a UI component goes from "false" to "true". I put "Fade" here so the UI component will fade in to view.
The application below is the finished result.
NB: You can right click on the applciations to View and download the source. Enjoy! :-)

fyi -- the 'view source' option returns:
"Sorry. There are no blog entries available that match your criteria."
@riabook: looks like I'll need to do a follow up post! watch this space!