SourceTec Software

It is currently Sat Apr 19, 2014 11:23 pm

All times are UTC + 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Tue Dec 14, 2010 7:01 am 
Offline
Member

Joined: Sun Jun 18, 2006 11:56 am
Posts: 10
Location: USA
I have a project in which I would like to change the color of a text object (created with the Text tool). For example, while the text object is onscreen and text is colored red, I would like to change the color of all of the text in this text object to black over a 2 second period with no screen motion or other effect on the text. Can this be done, and if so, how?

Ray


Top
 Profile  
 
PostPosted: Tue Dec 14, 2010 3:54 pm 
Offline
Guru
User avatar

Joined: Wed Feb 18, 2009 12:33 am
Posts: 402
There are several ways to reach that effect, it depends on how this would happen: after a click? after a period of time the text is shown?

You could use only ActionScript to reach that or

1) create a MovieClip with inside your red text in frame 1
2) copy frame 1 to N following frames. In this way you have red text for x seconds (set the frame rate).
3) copy last frame again and change the color from red to black
4) copy this last frame to N following frames In this way you have red text for x seconds.
5) At the end, MovieClip will start again with the same sequence of red and black text.

You can then add Event listeners if you want to manage that.


Top
 Profile  
 
PostPosted: Tue Dec 14, 2010 10:11 pm 
Offline
Member

Joined: Sun Jun 18, 2006 11:56 am
Posts: 10
Location: USA
Thanks for your comments. Actually I was hoping to be able to change the text color gradually, kind of like a "color-tween" effect so that the change from red to black would take two seconds, gradually changing the color from red to black over the two second elapsed period. The other issue is that I would need to do this about 50 times to 50 different text objects, as each one needs to be emphasized at a different time, so creating a movie for each instance would become tedious. This is what software is for, so us Humans don't have to do things like this manually!

Ray


Top
 Profile  
 
PostPosted: Tue Dec 14, 2010 10:19 pm 
Offline
Guru
User avatar

Joined: Wed Feb 18, 2009 12:33 am
Posts: 402
For tween effects you can set the first frame in black, the last frame in red and let the tween effect do the work (search here for some good tutorials).

About your 50 MovieClip, you need to start learning ActionScript that allows you to use only one pre-made MovieClip and then repeat it as many times as you need with different colors. Indeed with AS you can create directly MovieClips even only writing some code lines.


Top
 Profile  
 
PostPosted: Tue Dec 14, 2010 11:30 pm 
Offline
Member

Joined: Sun Jun 18, 2006 11:56 am
Posts: 10
Location: USA
> For tween effects you can set the first frame in black, the last frame in red and let the tween effect do the work (search here for some good tutorials).

Doesn't seem to work that way with color. I have no problem creating a motion tween effect, but if you change the last frame to red in the colored text object, then all instances/frames of the object (right from the beginning) change to red also.


Top
 Profile  
 
PostPosted: Wed Dec 15, 2010 4:14 am 
Offline
Guru
User avatar

Joined: Wed Feb 18, 2009 12:33 am
Posts: 402
I prepared a project for you with tween between two colored texts.

You can play with it changing the colors and the time lime, or adding some controllers.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Wed Dec 15, 2010 4:39 am 
Offline
Member

Joined: Sun Jun 18, 2006 11:56 am
Posts: 10
Location: USA
OK...the mystery is solved. I was trying to set the two instances of color to tween between using the Properties box (which would change all instances) and not the Transform box. At least in tracing through your example, I could see the color changing in the Transform box for the big hint.

Thanks for your help and patience.

Ray


Top
 Profile  
 
PostPosted: Wed Dec 15, 2010 2:46 pm 
Offline
Guru
User avatar

Joined: Wed Feb 18, 2009 12:33 am
Posts: 402
Yes, that was the trick! 8)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group