[quoted text, click to view] "Powercats22" <webforumsuser@macromedia.com> wrote in message
news:duac4i$npj$1@forums.macromedia.com...
> I'm trying to do something EXTREMELY simple, but all of my ideas run into
> dead
> ends. I simply want to have a box fade in and then fade out. No problem,
> right?
> If someone could give me a hand, that would be great.
>
> So far, I can get my box to fade in. The box is a mc on layer 1 and the AS
> is
> on an actions layer. My best idea is to run the alpha from 0 to 100, and
> then
> at 100% trigger the opposite direction. I thought I could do this in one
> frame,
> but it always ends in a loop fading from something like 80%-90%-80%...so
> on. So
> then, I come up with at 100% alpha, move to frame 2 and fade out. For some
> reason, I can get it to stop and fully run frame 1 before jumping to 2.
>
> Here is my code on an actions layer on frame 1:
>
> (stop);
> box01._alpha=0
> box01.onEnterFrame = function() {
> if (this._alpha<=99){
> this._alpha+=10;
> }
> if (this._alpha==100){
> gotoAndPlay(2)
> }
> }
>
> Any brilliant ideas out there to help me out?
> Thanks in advance
>
why use any action script? just create a movie clip with the box in
question. Click on frame one and create a motion tween. Create a key frame
at 5, 10, and 15. Click on frame one, click on the box, and then in the
properties at the bottom, change alpha to 0%. On frame 15 do the same thing.
Viola, a box that fades in and out.