Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 22nd, 2008, 03:47 AM
dada44 dada44 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2007
Posts: 26 dada44 User rank is Corporal (100 - 500 Reputation Level)dada44 User rank is Corporal (100 - 500 Reputation Level)dada44 User rank is Corporal (100 - 500 Reputation Level)dada44 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 6 h 44 m 31 sec
Reputation Power: 0
Change background color in a movie clip

Hi all,

I have a movie clip with an animation. The animation is a line that at certain point starts moving all the way to its right.
I would like to change the background color (or maybe add a background image) as the line travels to the right .
I suppose that the line has to move to the right and the new background to the left to make the effect that the line is entering in a new color as its travels ...but everything that I try is a wrong try. Can anyone please give me a hand??

Thanks in advance!

Reply With Quote
  #2  
Old July 22nd, 2008, 06:51 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,716 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11326 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 12 h 25 m 15 sec
Reputation Power: 580
Facebook MySpace
Hi, if you wanted it to start on a red background and then as it moves right transition to a blue background (I'm just using some example colors here), all you have to do is create a gradient colored rectangle that covers the full width of your animation.
  • Select the rectangle rool on the tool panel (R) and turn off lines in the two color boxes at the bottom. You should just have a straight color fill now.
  • Draw a rectangle on the stage.
  • With the rectangle selected open the Color panel (Shift-F9) and change the Type dropdown to "Linear". You should now see your rectangle showing a gradient, usually black on the left and white on the right.
  • The bottom of the color panel will now show a gradient color. By clicking the little peg on the left (the black one) you can then change the left hand gradient. Same for the right hand one. By clicking at other points between the two you can create new gradient points. For now let's just stick with the two though. For our example we want the left one to be red and the right one to be blue.
  • Say the line drawing animation covers two full widths of the stage, you will then need to make the rectangle that wide. You can either do that by selecting the rectangle and manually typing the width value into the width box on the properties panel or you can drag the rectangle corners (or anchor point if you use the transform tool (Q)).
  • Now you just need to tween it's animation to match the line i.e. slide from left to right. That could just be a case of having two keyframes; one at the start and one at the end with the first having a shape tween on it's keyframe.
That's the gist of doing it one way.
__________________
-Tann

-Vote for your favorite ActionScript editor here.

Reply With Quote
  #3  
Old July 23rd, 2008, 04:13 AM
dada44 dada44 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2007
Posts: 26 dada44 User rank is Corporal (100 - 500 Reputation Level)dada44 User rank is Corporal (100 - 500 Reputation Level)dada44 User rank is Corporal (100 - 500 Reputation Level)dada44 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 6 h 44 m 31 sec
Reputation Power: 0
Thanks Tann! You're awesome!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Change background color in a movie clip


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT