Alpha text

Hi, I’m making a movie and trying to use all AS instead of making tweens and I was wondering How I would get this effect. Right now I have a box inside a movieclip that expands and as soon as it expands to 100% it goes to fram 2 and plays a square that flashes white and then fades out. On frame 25 I have text that as of now just appears, but I would like to make it fade in using Actionscript. If anybody could help me out with this I’d greatly appreciate it.

If it’s a static text field you could convert it to a movie clip (right-click, convert to symbol…), give it instance name ‘mc’, set alpha to 0, then add some code like this on frame 25:


mc._alpha = 0;
onEnterFrame = function()
{
   mc._alpha += 10;  // use whatever increment you like   
   if (mc._alpha >= 100) 
   {
      onEnterFrame = undefined;
   }
}

If it’s dynamic text you could just name the text field ‘mc’ and apply the same code.

Well thats what I have and it dosent seem to be working…If you’d like to take a look at my .fla feel free. To get to my text go into the WindowMC, and the text is on frame 28 on the “text” level…It’s set as transparent, but in the movie it still just pops up instead of fades in.

edit: forgot the .fla extension on the end of my link, fla should work no

The fla looks like a bad link. Can you attach it to your post?

why not use a tween?
http://www.petitpub.com/labs/media/flash/astween/AlphaTween.as

There the link is fixed, and as for tweens, my goal for this is to use as much actionscript as I can.

embed the font :wink:

scotty(-:

Actually dave4|o was suggesting to use the Tween class, which is action script. And I agree the Tween object is a good way to go because all the code is written already. :alien2: