Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Color Change



Is there a way without tweening to change a MC color with a fade? I would like to be able to on(press) have a MC change to say red and then another color say blue and so on when another button is pressed....anythoughtsThanks pull_my_fingure



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 04-04-2005, 06:21 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How To Change MovieClip RollOver Color(NOT Single Color, But Gradient) Dynamically ?
hi

I have created this for single color.But how to change when it is a gradient color.
for single color rollover code.

Code:
rollcolor = "0xFF0000";
normalcolor = "0x339900";
my_color = new Color(my_mc);
my_mc.onRollOver = function() {
my_color.setRGB(rollcolor);
};
my_mc.onRollOut = function() {
my_color.setRGB(normalcolor);
};
Thanks in advance

How To Change MovieClip RollOver Color(NOT Single Color, But Gradient) Dynamically ?
hi

I have created this for single color.But how to change when it is a gradient color.
for single color rollover code.

ActionScript Code:
rollcolor = "0xFF0000";
normalcolor = "0x339900";
my_color = new Color(my_mc);
my_mc.onRollOver = function() {
    my_color.setRGB(rollcolor);
};
my_mc.onRollOut = function() {
    my_color.setRGB(normalcolor);
};
Thanks in advance

Hex Color Code To Change Movie Clip Color
Hi all, Sorry real quick,

i've got a text box with the text with a hex code from a color picker which reads say "FF0000" how do i use that hex code(FF0000) to change a movie clips color.

simple (me stupid)....

thxs for any help

jon

Return MC To Original Color After Dynamic Color Change
How is it done? All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.

I can accomplish the change as it passes over a frame, but I can't get it to change back.

In the frame is this:


ActionScript Code:
cHurtColor = new Color(_root.compMC);cHurtColor.setRGB(0x00FF33);

Trying to keep this simple....

Return MC To Original Color After Dynamic Color Change
How is it done? All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.

I can accomplish the change as it passes over a frame, but I can't get it to change back.

In the frame is this:


ActionScript Code:
cHurtColor = new Color(_root.compMC);cHurtColor.setRGB(0x00FF33);

Trying to keep this simple....

Button Change Color On Select, Then Change Back
I have 3 buttons, named but,but2,but3. What I want is if you click a button it changes color to show what page your on. But when you click a different button now that one is highlighted and the original one goes back to the original color. Here's the code.
but3.onPress = function () {
_root.createEmptyMovieClip("container", 1);
loadMovie("banner3.swf", "container");
container._x = 0;
container._y = 0 ;

I figure I have to add some kind of if statement?
}

Change Color For More Mcs With Color Object At A Time
This changes color of one mc:

Code:
myColor = new Color(myMovie);
myColor.setRGB(0x993366);


Is there a way if I have dozen of mcs to change color at a time for all this mcs?

Thank you

[F8] Color Swatch Or Change - Color Object?
You know how on retail sites or even a car site you can swap the color by clicking on the swatch and than the image changes the color. I wanted to do this in flash preferably with actionscripting but I have NO CLUE how to do it. Can anyone show me a tutorial or advise me o how to do this. This is just a BASIC example in flash five but this is the same concept I want. http://www.adobe.com/support/flash/i...y/colorobject/ If anyone knows of a high level example with tutorial I would appreciate it.

Turtle

Change Color For More Mcs With Color Object At A Time
This changes color of one mc:

Code:
myColor = new Color(myMovie);
myColor.setRGB(0x993366);
Is there a way if I have dozen of mcs to change color at a time for all this mcs?

Thank you

Random Color + Change Color With AS With Ease
HI,

I followed this tutorial , but IŽd like to add something more but donŽt know how.

I[d like to make the MC to load a random color, in a color range that I specify, like #000000, #FFFFFF and #111111.

Also, I want somew buttons to change between this colors, but with an ease transition.

How can I do this?

Drag Color And Change Objects Color
i looked at the kirupa's paint tutorial and it really didn't achieve the effect that i'm going for. i'm new to actionscript so i can't figure it out for myself, so i'm hoping someone can shed some light on the situation for me.

here is the setup: i have an object that i rendered in 3d studio max. will just call it a box. i have rendered that box in 3 different colors. red, yellow, and blue. i saved them each individually as targa files and imported them into flash. i created a movie with 3 frames. frame one contains the red box image, frame 2 contains the yellow box, and frame 3 contains the blue box. each frame has the stop command applied to it.

now on the main timeline, i have 3 different circles that have been converted to buttons each colored red, yellow and blue. now i can use a "tellTarget" type action to make the playhead on the box movie clip to jump to the corresponding colored circle that was clicked, but i'd rather let the user be able to drag the colored circle to that box, release, and change the box to the color that corresponds to that circle. i don't know if that requires some type of collision detection script or not. the box has no background so all there is, is the box itself so collision detection should just detect the box itself...right??

i would appreciate any insight that you could give me!!! if need be, i can supply a *.fla file for you to look at.

Random Color + Change Color With AS With Ease
HI,

I followed this tutorial , but IŽd like to add something more but donŽt know how.

I[d like to make the MC to load a random color, in a color range that I specify, like #000000, #FFFFFF and #111111.

Also, I want somew buttons to change between this colors, but with an ease transition.

How can I do this?

Change Color For More Mcs With Color Object At A Time
This changes color of one mc:
Code:

myColor = new Color(myMovie);
myColor.setRGB(0x993366);

Is there a way if I have dozen of mcs to change color at a time for all this mcs?

Thank you

Using A Color Chooser To Change Color Of MC
Hi,

I'm using a component which allows you to change the color of MCs but I can't get it to work...newbie sorry...

I have an MC on the stage with the instance main_mc which contains another MC called back_mc as well as a Mc (button_mc) which contains the component on frame 2 (ColorChooser) with this script :

code:
stop();
var myCol:Color = new Color(back_mc);
ColorChooser .changeHandler = function() {
myCol.setRGB(main_mc.back_mc.value);
};



Sorry if this is all very confusing...a path issue probably but I can't figure it out. Could someone help me please?

G

Color Change (heavy Change)
Hey everybody,

i dont know if this is possible, but it sure would be nice! I need to change all the elements in my movie that have the color X and change their color to color Y.
Is it possible to have this in AS? like, if i press one button all the elements that have the color black (graphic, text, background, etc) change their color to yellow?

thanks for any thoughts!!

cheers

Get The Color To Change Another Obj Color
Im trying ro change a MC color from get the color of another MC color.
Please please help I think im going mad...........
Really appreciate.
Cheers Matt

Is This Possible? Change Color
Hello,

i have a MC which has only a square.
Is it possible to change the color of that square with action script?

thanks,
Miguel

Color Change
is it possible to transform(with fade effect) the color of a movie clip or a graphic, ive tried the .setRBG and .setTransform, but the color changes right away without the fade...if u kno what i mean plz reply thx

Change Color
I'd like change color of MC bgLista which is inside of MC messaggio. But with (messaggio" add i.bgLista) I can't reach
bgLista and the change color is on messaggio.

What's wrong?????

for (i=0; i<array_length; i++) {
duplicateMovieClip(messaggio, "messaggio" add i, depth);
setProperty("messaggio" add i, _y, yposition);


set("messaggio" add i add ".ListaIdmessaggio", ListaIdmessaggio_array[i]);
set("messaggio" add i add ".ListaDataora", ListaDataora_array[i]);
set("messaggio" add i add ".ListaNickname", ListaNickname_array[i]);
set("messaggio" add i add ".ListaOggetto", ListaOggetto_array[i]);


Lista = new Color("messaggio" add i.bgLista);
i%2==0 ? Lista.setRGB(0xCCCCCC) : Lista.setRGB(0xffffff);
delete Lista;

depth--;
yposition = yposition+25;
}


Thanks in advance
manner

Help Using AS To Change Color
Hi Everyone,

I'm trying to change a small spinning house MC named "house" to a different color using AS... I would like it to change using the hittest method when you just rollover it ... or....

I would like when you rollover the invisable button I have over it to have the rollover code to change the color of the house MC... this is what I have on the invisable button right now and it isn't working:

on (rollOver) {
black = new Color(house);
black.setRGB(OxFFCFCF);
}
on (release) {
gotoAndPlay ("home");
}



FFCFCF is the hexidecimal color I would like to change it to. I would like it to be like a tint function. I got this portion of code from one of the tutorials on the site but I think I have somehow messed it up.

Thanks in advance.

Dwyermm7

Change Bg Color W/ AS?
Can you change the background color of a movie with actionScript?

Color Change
Is there a way for movie clips to reference a variable in order to set their fill and outline color? I thought it would be advantageous to set up some code for the 'interface' portion of a site to make color changes easy. I've checked out the .new Color actionscript but I'm not sure it would handle what I'm after. Any thoughts or links??

Thanks!
BlueRhino

Change Color
Hello,

i want to change the color of a MC from red to blue when i move the mouse from a 30 _x position to a 60 _x position.

I want the red color to gradualy change to blue.

Does anyone knows how to create this?

Thanks,
Miguel

Color Change Again
hello,

Can someone explain to me how this is possible in flash 5 please :

change = new Color(movie.colorChange);
change.setRGB("0x",text);
text = "FF00FF";

I want to chaneg a color of a movie clip inside a movie clip but I want the hex value to come from a variable "text = "FF00FF";" like that !

Thank you, please.

Change Color Of MC
Hi!!

Haven't done any flash for a while. I only do it for my own purposes and for friends. I'm making a flash that has a movie clip i want to change colors. Ive searched the forums and tutorials on several sites but can't seem to find the solution to my problem.

I can get it working if i place the actionscript on the main timeline. But i'd perfer to change it inside the mc since the main timeline may get more complex when i add the text animation.

The problem i have is when i try to change the color inside the movie clip (logo_mc). inside logo_mc is another mc named my_logo. my_logo just has a gif image i want to change colors. I'ts just a b&W image.

I use onClip(load) where i define the color and transform objects. Then I have an onClip(enterFrame) where i use random numbers to generate the new rgb values.

When the mc reaches the onClip scripts, i can see the color start to change then it goes back to the original color.

I've used the trace function and noticed that each time it hits the frame with the onClip() that it not only process the onClip(load) each time, but that it seems to go through the onClip(enterframe) statements 3 times...I have 3 statements to get new values for the rgb values...one for each r,g,b. When I put in 3 more variables to generate the ra, ga, ba, values i get what appears to be 6 loops through the onClip(enterframe). Is there a casue and effect here that I'm unaware of?

So here's the code...

onClipEvent (load) {
changeColor = new Color(this);
colorTransform = new Object();
n = 1;trace("GRRRRRRRRRRR");
}
onClipEvent (enterFrame) {
colorTransform.rb = Math.round(Math.random()*255);
colorTransform.gb = Math.round(Math.random()*255);
colorTransform.bb = Math.round(Math.random()*255);
n = 1;
trace(colorTransform.bb);
changeColor.setTransform(colorTransform);

}

This code is in frame 8. where i'd like the color transform to take palce. I've tried it in frame one of the mc but get the same results. Any ideas? The attached fla might expalin things better than i did. It's not very complex.

Thanks!!!

PS looks like file too large with other graphics...sould work now

Change MC Color Through AS
I've a tiny problem. I want to change the color of a circle through actionscript. Is it possible? It would be fantastic if something like this could work:


Code:
_root.cirkle._tint = #5583CE


ofcourse this doesn't work but is there something similar to this?

Thanx in advance.

Nasier

AS Color Change
I have an animation as a movie clip. How can I code it so that the color of it changes(to like a transparent red)? Thanks

Change And MC Color
i want to dynamically change a MC's (just a simple square)rgb value.

i have the three sliders that set variables R,G,B, and each returns a value up to 255.

How now can i use those values now to change the color of the movie clip. I see options for hexadecimal values but not real rgb values.
Any idea could help.
Thanks
Steve

Color Change
hi all!
does anyone know of a script, etc. that will FADE a color from one color to another without keyframing.

the problem is that i have to fade from any one of ten colors to any other of the ten based on the button pressed.
thanks in advance..
-jason

Color Change
hey I need to know, how make this hot effect http://www.floetry.net when u change of sections change the movie propieties can u help me to do it??

Change Color
Hi all,

I have white t-shirt jpg which i imported into main stage.

I know how to change color.My problem is changing color it changes color of the whole shirt solid and cant see the stiching and folds of the material.

I used alpha 50% and then can see all the details but then the color is a blend of the white and what ever color I pick. Black comes out grey, dark blue comes out light blue.

Is there anyway to do it?

I dont want to load 20 jpgs of all the t-shirt colors.Just have one and user can change it using color chart.

thanks

Color Change?
Hi!
I'm fairly new with Flash, but i've been trying to build my own homepage with it for a couple of days now, but i just can't figure out how to make the color change on the textlinks when i put the mouse over it...

I'm sorry if you don't understand what i mean,
but i'm swedish so my inglish isn't so good.

Color Change Mc With As
Hi

I need some help...

I have a button that I want to tell a mc to change color on rollOver with action script. Can anybody help me?

Thanks

Change The Color
hey everybody, how would one change the color of a mc using action script??

and if thats not tough enough is it possible to change it to a linear color?

thanks for any help at all

How To Change A MC's Color
Hello everybody...

I have a mc on my stage and it's duplicated several times. I want to give each instance a different color, and instead of having several movieClips, how can I assign them a color with AS?

Thanks for your help.

Halanis

XML To Change Color
Oye, my heads exploding.

Im using this code on a frame to change the color of a simple movieclip called shingle.

Code:
thisXML = new XML();
thisXML.ignoreWhite = true;
thisXML.onLoad = LoadColorData;
function LoadColorData() {
main = this.firstChild.firstChild.attributes["color1"];
myColor = new Color(shingle);
myColor.setRGB(main);
}
thisXML.load("config.xml");
and my XML looks like this

Code:
<?xml version="1.0" standalone="yes"?>
<config>
<background color1="0xFF0000">
<background color2="0xCCC000">
</config>
I cant seem to get flash to read the second entry in my xml file. I have another movieclip that needs to change color according to the second entry. I cant seem to get a second entry in my xml file to be read by flash :
Any help please?

How Do I Change Color Of Mcs?
This is a menu included in a tutorial of some software. When you click on each of these menu items, it plays a movie on the software (on the left)

Here is what I need to do...

I am wondering if there is a simple actionscript that I can assign to each of the mcs so that when you roll over them they change color. Doesn't have to be fancy- I just want people to realize that the menu items are actionable.

Any advice would be great. Thanks!

Color Change
Hi guys. Hoping someone can help.. I know how to simply change the color of a MC using the :


ActionScript Code:
on (release) {
myColor=new Color(box);
myColor.setRGB(0xFF3399);
}

type of AS, but is it possible for the MC color to blend from one colour to the next rather than changing it as soon as you click on the button? really desperate to get this working but cant seem to find anything online about it.
Hope you can help. Many thanks
Phil

Change MC Color
I have a running example wich may save me some explaning: www.kirl.nl/magnetBall7.html.

If any of the little balls register as hitting the circle, I want to change their color. This is somewhat comlicated by the fact that the little balls all have a black edge, so a colortransform wouldn't really work.

I found a swapElement() command, but I couldn't get it to work properly. I have pasted the relevant part of the code below.


Code:

score = 0;
for( var i=0; i<numBalls; i++)
{
var ball:MovieClip = this["ball" + i];

for (var j=0; j<numGoals; j++)
{
var goal:MovieClip = this["goal" + j];
if(goal.hitTest(ball._x, ball._y, true))
{
score++;
ball.swapElements("ball2");
}
}
}
I have a green ball MC called ball2 in the library.

What am I doing wrong?

Change Color
what's the easiest way to set the color of a movie clip?

I just want to simply change from one solid color to another - is AS 2.0, it was so easy - setRGB();

all the examples i've looked at seem to be overly complicated.

Change Mc Color?
I have a movie clip on the stage called fillBox_mc and the shape inside it is blue.

I want to make it green after a short while....how do I do that with AS??

Change The Color Of An Mc
Hello,

I would like to change the color of a Movie with an instance name "support". so when you click on a button saying "red" the movie turns to #FF0000 and if i click on white butoon is goes to #FFFFFF.

Thanks,

Color Change
i am trying to make let's say, 1 object changes color as another 1 object comes near... does anybody have a sugestion? I'm tying it with tweens right now but i'd like to use action script to do it... laters Jimmysomebob

Can't Change My Color?
Hi,

I'm using Flash CS3 to make an illustration. I'm pretty good at drawing but I'm new at Flash, so maybe there's a really easy and dumb solution but I just can't figure it out.

I'm using the brush tool, and I was almost finished drawing my image when at some point, I can't change my colors anymore. I'm in the color tab on the upper right side of the screen. On that little square where I can usually select my color (right next to the R,G,B numbers), as soon as I click on it to select a color I want, the cursor goes back to the grey at the bottom of the square. So I'm stuck with the same grey and I can't change it, so therefore I can't finish my image since I need to change my colors.

I bet there's a really easy way to fix it (I must have clicked something I didnt want to by accident) but this is my first time at Flash so I really don't know. I'd love some help because this is for a school project that I really need to finish asap.





























Edited: 10/03/2008 at 07:30:45 PM by Nicochan5

Color Change
I am trying to make a game and i have a circle spinning on 150 px radius and i want to make the circle change color (ex:red) at a certain spot on the screen but be a different color (ex:black) the rest of the time.

here a link to to the movie

http://www.freewebs.com/oemness/circlehelp.swf

Color Change With As
Hello !
I'm trying to change the color of two movieclip with AS, I re-used a piece of AS that i found on this forum and which changed the color of a movieclip with ease. The problem is that i have some difficulties in understanding the code and when i test my movie it won't change to the color i want. I know i must do wrong thing but i can't figure it out.
The color value that i want (just for the test) are stored in
ActionScript Code:
but.onRelease = function() {        btarR = 1;        btarG = 1;        btarB = 1;        btarA = 100;            };

If someone could explain me how this thing work or fixed it, it would be great !
Thanks
Ubik

Color Change And Etc.
hey, i'm really new at this...again...i've forgotten how to do anything... i was curious as to how you change an object's color smoothly with transition.

i also forgot how to go to a certain frame by clicking a button.... im trying to create an online web page using purely flash... and i need someone to refresh my memory on the coding....

thanks a lot.

Color Change
I have created xml driven drop down menu after seeing the tutorail in this site.
I want the menu like in windows start button,that means ,when i click the button the submenu should be created and the color of the button remains unchanged.And when i rollover on, other than the previously clicked button the color of the button(previous)has to be changed to normal color.
Here by I am attaching the fla file,

please help me soon.

Color Change
Is there a way without tweening to change a MC color with a fade? I would like to be able to on(press) have a MC change to say red and then another color say blue and so on when another button is pressed....anythoughts



Thanks
pull_my_fingure

Change Color
when i click on a button I wont to be able to change color on 3 different objekts at the same time and whit a fading effekt. Is the any one how can help me whith that. I want to have 3-4 buttons how change the objekts colors to different ones.

Tanks !



/M

Copyright © 2005-08 www.BigResource.com, All rights reserved