Flash as3 ---- fade text in and out using script not tweening

Posted on 2009-04-21
Medium Priority
Last Modified: 2013-11-11

I am using Flash CS3 and I would like to fade text in then fade it out then fade in a second piece of text then fade it out

like this:

fade in> text1> 10 seconds pass> fade out text1> 2 seconds pass

fade in> text2> 10 seconds pass> fade out text2> 2 seconds pass

etc etc etc with  text 3 and 4 and so on

i can do this with tweens on the timeline but it makes a big file - is it possible to do it with action script?

please could someone give me some guidance on how?

thanks very much,

Question by:kikisu
LVL 19

Assisted Solution

quizengine earned 400 total points
ID: 24193186
Text is handled very efficiently in Flash. You should *not* have a large filesize from creating two text tweens.

Is this text created in Flash, or have you imported it from another program ? And if you have imported it, it may well be coming into Flash as an *image* - yes, you and I see it as text, but a picture is a picture, whatever is in it. And tweening pictures takes much more filesize. If that is the case, you will save much space by creating the text in Flash, turning it into a movie clip, and then tweening them on the timeline.

Assisted Solution

ariestav earned 400 total points
ID: 24194508
Are you familiar with loading external libraries?  One of the most flexible ones in my opinion is Tweener, which is just a set of libraries that you load into your action script and then you follow the guidelines to animate with code.  

Check out the following address for more information:


There are many options you have for tweening when you use a library like this.


Accepted Solution

biyik earned 1200 total points
ID: 24197153
If you use Tweener class it's really easy to do.
Quick example :
fade in> text1> 10 seconds pass> fade out text1> 2 seconds pass =

import caurina.transitions.*
text1.alpha = 0;
text2.alpha = 0;
Tweener.addTween(text1, {alpha:1, time:1});
Tweener.addTween(text1, {alpha:0, time:1, delay:10});
Tweener.addTween(text2, {alpha:1, time:1, delay:12}); ...

just download the file from " http://tweener.googlecode.com/files/tweener_1_31_74_as3.zip " and copy the "caurina" folder next to your .fla ...

Author Closing Comment

ID: 31572677
thank you for your help!

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses
Course of the Month17 days, 8 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question