David Harris's Technology Blog

ColdFusion, Flex, and other stuff...   (and 327,015 hours, 18 mins in to my plan for global domination)

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:

Enter your email address to subscribe to this blog.

Archives By Subject:

Tags:

adobe air ajax cfug coldfusion flash flex frameworks free software fxug general jpgmetadatareader mac off topic opensource papervision spry

Recent Entries:

No recent entries.

Top Posts:

Recent Comments:

Top Commenters:

My Links:

RSS:


Simple Effects on a Form - Flex Example - the next version

In my previous post I had an example on simple effects in Forms.

As was quickly pointed out in the comments, if you click on the "Toggle Form" button quickly so unexpected behavior happens.

Try it if you like:

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

The issue seems to be that while the effect is playing, it will finish playing even if the "advanced" value has changed while it is playing. (make sense?)

So to work round this, I have added a <mx:Move> effect tag of my own and given it an ID. In the moveEffect attributes of my tags now I have put the ID of my Move effect Then in the Button tag, on the "click" event, rather than switch the "advanced" value in there, I am now calling a function.

What the function does is check if the effect is playing, and if it is NOT playing, it toggles the "advanced" attribute.

This means that even if the button is clicked rapidly you won't get the unexpected behaviour that was happening previously.

For a bit of fun, I put the "Bounce.easeOut" function in the "easingFunction" attribute of the move effect.

Have a Look:

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

Related Blog Entries

Comments
nice !!but still a question , how can I resize the panel when the advanced property changed
# Posted By riabook | 3/13/08 6:58 AM
very interesting post. although you have to click quite a few times to get the incorrect display to happen, it's a nice detail to think about. I like the bounce effect.
# Posted By Pascal Roy | 3/15/08 8:57 AM