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

Hi,

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,

Kira
kikisuAsked:
Who is Participating?
 
biyikConnect With a Mentor Commented:
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 ...
 
0
 
quizengineConnect With a Mentor Commented:
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.
0
 
ariestavConnect With a Mentor Commented:
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:

http://hosted.zeh.com.br/tweener/docs/en-us/

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


0
 
kikisuAuthor Commented:
thank you for your help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.