The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> Flash Help
|
Swapping colors
Discuss Swapping colors in the Flash Help forum on Dev Shed. Swapping colors Flash Help forum discussing all products originally created by Macromedia including DreamWeaver, Contribute, Flash, Fireworks, Freehand, Director, Authorware and HomeSite. Adobe bought Macromedia in 2005.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

September 6th, 2002, 05:59 PM
|
|
|
|
Swapping colors
What is the best way to swap colors in a Flash movie? The swatch/mixer system seems to be very limited and I'm having trouble getting anything doen using that system. If there are, say, 100 symbols using the same 10 colors and I want to swap out those colors to create a different color scheme, without having to edit each symbol one by one, how would I do that?
|

September 11th, 2002, 11:33 AM
|
|
Contributing User
|
|
Join Date: Jul 2000
Posts: 669
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
Are you using Flash MX? If so its as easy as:
Code:
myColor = new Color(targetMC);
myColor.setRGB(0xFF0000);
So if you knew all the MC names you wnated to change ahead of time. Let's say they were clip1, clip2, etc.....
Code:
for(var i=0;i<10;i++) {
var myColor = new Color(this["clip"+i]);
myColor.setRGB(0xFF0000);
}
|

September 11th, 2002, 06:56 PM
|
|
|
|
I'm using Flash 5. You can do the same thing in Flash 5 but I know that it makes the entire mc one solid color, which won't work.. There are hundreds of separate symbols, so I don't think that method will work for me.
|

September 11th, 2002, 07:03 PM
|
|
Contributing User
|
|
Join Date: Jul 2000
Posts: 669
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
Why can't you apply the color transformation to the individual symbols? Or are they not actually movie clips?
|

September 12th, 2002, 06:22 PM
|
|
|
|
The code will change the entire mc or symbol to one solid color, which won't work. There are hundreds of separate symbols and MCs, it would actually be easier to change the colors one by one in Flash than to write code to change each one...
|

September 12th, 2002, 06:30 PM
|
|
Contributing User
|
|
Join Date: Jul 2000
Posts: 669
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
Yes I understand that. But what you are saying is that one MC holds hundreds of separate MCs, right? SO use actionscript to change the separate MCs. I mean you did name them something that can be looped through right like sub1, sub2, sub3, sub4, etc.....
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|