Calling alpha value to start another alpha fade?

hey all!

okay so here’s the deal I’m on a mission to make these buttons fade in one after another using a.s

and I’d like all my code to be in one frame [don’t we all though :sure:]

so far i have one fading in using

this.onEnterFrame = function() {
 if(btn1._alpha < 100) {
 btn1._alpha += 10;
 }
 }

now when i said i wanted the buttons to fade in one after another i was kinda fibbing :ne:… what i really want is when btn1 reaches an alpha of 40 i want btn2 to start this same fade in process, then when btn2 reaches 40 i want btn3 to do the same and so on…

see the effect here [you have to enter the site] when you click on work, troops & contact

now i have also been searching for a **easy to understand **tutorial on how to make your own functions [that’s the one where you can write a whole bunch of code stuff then call it later using only a little code, right?

well obviously i want to use this idea so i don’t have to write out [okay lets be real here - copy and paste] the fade in code each time.

that way i figure i can say

if(btn1._alpha = 40)
do the function thingy to btn2

i tried this a.s, it only results in btn2 fading in as asked but btn1 stops fading at 40


 if(btn1._alpha = 40) {
 this.onEnterFrame = function() {
 if(btn2._alpha < 100) {
 btn2._alpha += 10;
 }
 }
 }

any ideas would be the shizzel bo dizzel nizzel!

cheers fo’ all the help so far!

-demian