banner ad
Monday, March 31, 2008
Accordion Menu in AS3 v1

Accordion collapsible menu in AS3. This experiments is a rewrite of the version I had done using the Adobe Flash 9 public alpha.   I based the AS3 code on the collapsible menu v2 post.  In this example I rewrote a function for the tween animation using a sin equation. In my next version I will use my custom AS3 easing class  written based on the easing formula posts.


The experiment uses an external class to create the slider.  You can download the slider class here. Use it to set the speed of the collapse.


»comments

Matt Przybylski said...

At one point I broke it and was able to open more panel than one at once. Not sure how to recreate but it did break.

On second thought, if you put the slider all the way down, then start clicking, after you've already clicked a couple of things before putting the slider down, thats where the bug comes into play. hope that helps.


paul+ortchanian said...

Yeah, I am aware of that glitch. that's cause you set the speed to 0. In theory there would be no reason to set the speed to 0, that defeats the purpose of the menu. although I left it in there since we are working with a slider.

Thanks for the pointer.


Noponies said...

Nice class and demo.


Jim said...

I have been playing around with this (Fantastic by the way !) and I have removed the slider element and made the speed fixed. I have also set it to get the maxItems from xml.length()
But it always seems to add one more PrimaryButton than needed !

The AS file can be found to via ^ my name/url


Name
URL
Email
*email address is not published
Remember Me
Comments

CAPTCHA






banner ad