# Actionscript fade tween

**URL:** https://forum.kirupa.com/t/actionscript-fade-tween/140231
**Category:** Uncategorized
**Created:** [March 9, 2005, 10:37am UTC](https://forum.kirupa.com/t/actionscript-fade-tween/140231 "2005-03-09T10:37:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RabBell](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rabbell/32/340_2.png) [@RabBell](https://forum.kirupa.com/u/RabBell)
#### Post date: [March 9, 2005, 10:37am UTC](https://forum.kirupa.com/t/actionscript-fade-tween/140231/1 "2005-03-09T10:37:41Z")

</div>

trying to actionscript a tween for the first time and looking for some help.

I’ve created a movie that should start at 0 alpha and fade into 100. I’ve done this a million times using the “Create Motion Tween” feature but I want to to do this using actionscript. In the first frame of the movie I’ve put this code

```auto
var lcount;

lcount = 0;
while (lcount <= 100) {
	alogo._alpha = lcount;
	lcount = lcount + 1;
}

gotoAndPlay(2);

```

alogo is obviously the name of the movie fading in. Anyway in frame 2 it really just continues playing until frame 30 where it says

```auto
if (lcount == 100) 
{ stop(); }
else
{	gotoAndPlay(1);}

```

now the movie fades in too fast. In fact one minute it’s not there and then viola…apart from slowing the frame rate (which I don’t want to do - it’s at 30 just now) how can I get this to gradually fade in like the “Create Motion Tween” does?

Any help is appreciated :cool:
