Actionscript fade tween

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

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

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: