# Actionscript fade in/out

**URL:** https://forum.kirupa.com/t/actionscript-fade-in-out/80372
**Category:** flash
**Created:** [February 21, 2005, 8:18pm UTC](https://forum.kirupa.com/t/actionscript-fade-in-out/80372 "2005-02-21T20:18:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lincolnbarr](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/lincolnbarr/32/1133_2.png) [@lincolnbarr](https://forum.kirupa.com/u/lincolnbarr)
#### Post date: [February 21, 2005, 8:18pm UTC](https://forum.kirupa.com/t/actionscript-fade-in-out/80372/1 "2005-02-21T20:18:53Z")

</div>

Hello!  
I am trying to figure out a way to use actionscripting to fade in and out a series of “headlines”. So far what i have is: a moviclip with a different “headline” in each frame, with a stop(); at every frame. On this instance I have the code:

onClipEvent(load) {  
\_alpha = 1;  
diff = 5;  
}  
onClipEvent(enterFrame) {

if (\_alpha \>= 100|| \_alpha \<= 0) {  
diff = -diff;  
}  
\_alpha += diff;  
}

This works fine to fade in and out the first frame, but i need a script that will know when the movie has faded in and out one time, then move to the nextFrame(); and to it again. Make sense?

Any ideas greatly appreciated!!
