InvaderPiotr
02-25-2003, 04:33 PM
As an exercise, I'm trying to build a menu system like the one at http://www.teknision.com.
So, let's assume that I'm working on just one 'slice' of the navigation, a series of movie clips with previous and next arrows to navigate between them, with easing done in AS using deltas.
Now, I'm using a loop to build the MCs horizontally and a couple of buttons for scrolling back and forth, and that works fine, but I can't figure out how to do is fade each MC in sequentially - have them fade in one after the other (or delay it the way Teknision's done it - as they come on, they appear one after the other with a pause in between each one).
I thought I could try an alpha fade on the MC as it's attached inside the loop like so:
for (i=0; i<=_root.clipamount; i++){
//make clips
this.attachMovie ("daclip", "daclip"+i, i+1);
this["daclip"+i]._x = this["daclip"+i]._width * i + (i*5);
this["daclip"+i]._y = 80;
//get width of clip
this["daclip"+i].clipwidth = this["daclip"+i]._width;
//trying to fade the clip... what am I doing wrong?
this["daclip"+i].onLoad = function() {
this._alpha = 1;
}
this["daclip"+i].onEnterFrame = function () {
this._alpha += 1;
}
}
...but that doesn't work. If I put a fade into the blank MC that I use to build the menu it obviously fades all of them in at the same time.
What's the flaw in my logic?
Many thanks,
Piotr
So, let's assume that I'm working on just one 'slice' of the navigation, a series of movie clips with previous and next arrows to navigate between them, with easing done in AS using deltas.
Now, I'm using a loop to build the MCs horizontally and a couple of buttons for scrolling back and forth, and that works fine, but I can't figure out how to do is fade each MC in sequentially - have them fade in one after the other (or delay it the way Teknision's done it - as they come on, they appear one after the other with a pause in between each one).
I thought I could try an alpha fade on the MC as it's attached inside the loop like so:
for (i=0; i<=_root.clipamount; i++){
//make clips
this.attachMovie ("daclip", "daclip"+i, i+1);
this["daclip"+i]._x = this["daclip"+i]._width * i + (i*5);
this["daclip"+i]._y = 80;
//get width of clip
this["daclip"+i].clipwidth = this["daclip"+i]._width;
//trying to fade the clip... what am I doing wrong?
this["daclip"+i].onLoad = function() {
this._alpha = 1;
}
this["daclip"+i].onEnterFrame = function () {
this._alpha += 1;
}
}
...but that doesn't work. If I put a fade into the blank MC that I use to build the menu it obviously fades all of them in at the same time.
What's the flaw in my logic?
Many thanks,
Piotr