Color Object Problem
Hi,
I can't change the color of a movieclip that has a color object and was swaped with swapDepths() !
The clips onload script is:
onClipEvent (load) {
myColorObj = new Color(this);
this.swapDepths(9999);
}
When I try to change the clips color with setRGB(myColor) it does not work.
But when I remove the swapDepths() it works.
Is this normal?
ciao
m
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-02-2002, 06:40 AM
View Complete Forum Thread with Replies
Sponsored Links:
[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
View Replies !
View Related
Setting The Color Of Multiple MCs Using One Color Object
Hiya I am making a movie that has to be published to Flash Player 6 and want to set a bunch of movie clips to have the same color. Here is my function:
ActionScript Code:
var fillObjs_ar:Array = [square_mc, circle_mc];function colours(array:Array, color) { for (i=0; i<array.length; i++) { var my_color:Color = new Color(array[i]); my_color.setRGB(0x+color); }}colours(fillObjs_ar, FF0000);
My problem is that I get the error message:
"Hexadecimal digits expected after 0x" referring to the 4th line of my function.
If anyone could help me out it would be really appreciated.
Thanks
Schm
View Replies !
View Related
Hex Color As Variable In Color Object?
im trying to do this
myColor = new Color(myMC);
myColor.setRGB(variable);
we have all of the colors we need in css info in a database but im attempting to use the same values in flash. i can load the variables in fine but when i try to set them as a hex color it just assumes the letters are hex colors.
any suggestions
View Replies !
View Related
Background Color With Color Object?
Hey guys, quick question, is there a way to control the background color of a flash movie using the color object or some other way? i would like the entire window (html background included) to change, so sticking a stage-size movieclip in the back wouldn't help. Thanks .
View Replies !
View Related
Color Object- Get Color Name?
Hello,
I made a color picker and I was wondering if the color object had any way of grabbing the actual color name?
I know I could put all the colors into an array and call them up as needed... I've done the same thing in C#... and the color object in C# has a color name feature, I was wondering if Flash's color object had the same deal.
-Ryan
View Replies !
View Related
Color Object How To?
I want to change the the color of a movie clip with actionscript, but i want it to change in increments.
I have been messing with the color objects but i have not used them before so i am no quite sure what i am doing. Could someone tell me how i can go about getting this done.
View Replies !
View Related
The Color Object
Got a question.
Do you have any idea how to go back to the original color of an object after having used setRGB(...
For instance I have a red box with a black border.
Using the code below the entire symbol is changed to WHITE, which is desired.
headColor.setRGB(0xFFFFFF);
But if I want to change it back to the red box with the black border, it seems impossible. Picking another setRGB color does not give me the original symbol which was red with a black border, it just paints it all a different color.
How do i return to the default of NO TINT ?
Any clues?
Love to hear your solution here if you have the time.
Jay
mailto:jay@flashbomb.com
http://www.flashbomb.com
View Replies !
View Related
The Color Object
Hi:
I have an interface I want to change the color of by changing the alpha and RGB values for an MC (Vector Shape).
The AS reference doesn't give a very detailed explanation of how to do this. The example used is in response to user input through a text field. I just want someone to be able to click on a button and and have the MC change to the color and alpha value I have predetermined.
I believe I need to use the .setRGB() and setTransform() methods of the color object, but I haven't used these before and haven't been successful making this work, thus far.
I have done this using tweening, but then the color jumps from one to the other. If, however, the current color is green, alpha 22%, I want to be able to change it to red, alpha 18%, for example, without going back to the original color first.
Does anyone have a script they'd like to share?
The above will do, but if some could share how to do this over time as well, that'd be even better. For instance, change the color over 50 frames. My movie is currently set to 24fps, and just using onClipEvent(enterFrame) will change the colors too quickly, so that it creates a strain on the eye. I'd like to slow the change down.
Thanks, in advance.
James
He is risen!!!
View Replies !
View Related
Color Object -
ok, I need to get rid of some color objects.
needed to make some things go to dynamically assigned color, but want them to come back to their original state.
how do I lose the color object once I've made it?
I've tried clear(), myColorObject = 0 ... nothing seems to work
any input greatly appreciated
View Replies !
View Related
Color Object -- MX
I am trying to dup an array of mc's and change the color of each -- I dup an mc 5 times and move it up one and left one from the previous, then change the color of each. It dupps all, but only changes the color for the first set of dupped MCs...here's the code:
why can't i change the color for the next mc I dup?
var t = new Array(mc_0, mc_1);
highlightC(t);
//
// Vars for dupping the passed mc
var c;
var MAX0 = 5;
var mcLevel = 100;
//
// Vars for changing the color of the dupped mcs
var cColor;
var cColorArray = new Array("0x000000", "0x333333", "0x666666", "0x999999", "0xFFB100");
//
// Dup the passed mc and change the color of it
function highlightC(temp) {
//
var MAX1 = temp.length;
for (k = 0; k < MAX1; k++) {
for (i = 0; i < MAX0; i++) {
mcLevel++;
trace(temp[k]);
c = temp[k].duplicateMovieClip("dup_" + i, mcLevel);
c._x -= i;
c._y -= i;
//c._alpha = (i+35)*(i+1);
//
colorC(c);
//
}
}
}
// Change the color of the dupped mc
function colorC(c) {
cColor = new Color(c);
cColor.setRGB(cColorArray[i]);
}
tx
View Replies !
View Related
HELP Color Object
Hi,
I'm having trouble changing colors in my new movie. I used the color object in a previous test, but can't get it to work here. I've tried everything I can think of.
Can anone help me?
Here is my FLA (PC): http://www.arcticweb.ca/abc/bearshiding8.fla
View Replies !
View Related
Color Object - Please Help
Hi,
I'm having trouble changing colors in my movie. I've used the color object a few times before, but can't get it to work here. I've tried everything I can think of.
I can't really explain it, and the code itself won't tell you much without the objects, etc., so I've attached my work file.
Can anone help me? PLEASE?? This is gonna drive me *&^%$ nuts!
Here is my FLA (PC): http://www.arcticweb.ca/abc/bearshiding8.fla
View Replies !
View Related
Color Object
does any one have any idea how to make a color fade from RGB value to another? I've been trying to use setTransform but it dosen't seem to be working.
any help would be greatly appreciated
View Replies !
View Related
Color Object Help
I am trying to create multiple color objects, all with the same name, but on different MCs. If I go onto each MC, I can create the color objects with an onClipEvent(load) event, but that doesn't help me in this instance.
Why isn't this code creating these Color objects? What code should I use to create them?
Here is my basic code.
on frame of _root:
function colors(pathToMC){
this[pathToMC].furtherPath1.thisColor = new Color(this[pathToMC].furtherPath1);
this[pathToMC].furtherPath2.thisColor = new Color(this[pathToMC].furtherPath2);
this[pathToMC].furtherPath3.thisColor = new Color(this[pathToMC].furtherPath3);
}
I have also tried:
function colors(pathToMC){
thisColor = new Color(this[pathToMC].furtherPath1);
thisColor = new Color(this[pathToMC].furtherPath2);
thisColor = new Color(this[pathToMC].furtherPath3);
Thanks in advance for your help.
_t
View Replies !
View Related
Using Color Object
hi,
can someone tell me how to convert from a 6 digit hex colour value say FF00FF into the required values for the Colour object? so I can then use something like c.setTransform(ct); to change the colour of my clip?
thanks for any help.
boombanguk
View Replies !
View Related
Getting The Color Of An Object
I have a world map with each piece of the map as movie clips. Each MC is set to a color (using ColorTransform) based on some data about the state that i load in. When i click on the MCs I want to temporarily change the color to something else while displaying information about the MC and then change it back when i select another MovieClip. How can i find out what the current color of the clip is so i can store it in a temporary variable to know what i need to change it back to once i select some other?
I have a workaround but it is not 100% foolproof.
View Replies !
View Related
Color Object ?
in the first frame of my movie I have this code:
[code]
function combineRGB(red, green, blue){
var RGB = (red<<16)|(green<<8) | blue
return RGB
}
myColor = new Color(_root.carColor);
[code]
I have two movie clips on the stage and I want to put the r value of the color into a text box when I rollover the movie clip. So I have this:
Code:
on (rollOver) {
_root.myColor.setRGB(_root.combineRGB(255,0,0))
_root.red.text = "255"
_root.green.text = "0"
_root.blue.text = "0"
}
How can I get the actual value of the colors in the text box so I don't have to do what I am doing now,which is hard coding them in.?
View Replies !
View Related
Color Object With
Object A in flash
is colored as follow
colorchange = new Color("_root.A");
colorchange.setRGB(colorselected);
where colorselected is color picke dup from color pallette
Normally when we draw an object (circle , square or rectangle ) its is drawn with fill color (shown by bucket in tool bar) and stroke color (shown by pencil on tool bar).
These 2 buttons are found on a tool bar very near to each other.
My question is can how do we give "stroke color" to the object A
For example command
colorchange.setRGB(colorselected);
is used to color an object
then what is command to give stroke color to the object
Thanking you in advance
Vikas
View Replies !
View Related
Array For Color Object?
hi
I want to set the color for my mc accordingly array.
//Action on frameMain TimeLine)
colr = new Array(10);
colr[0] = 0xffffff;
colr[1] = 0x00ffff;
colr[2] = 0xff00ff;
colr[3] = 0xffff00;
colr[4] = 0x00ff00;
colr[5] = 0x000000;
//Action on MovieClip:
onClipEvent (mouseDown)
{startDrag (this, true);
mycolor = new Color(_root.brush.tip);
mycolor.setRGB(colr[2]);//this is not happening
}
onClipEvent (mouseUp)
{
stopDrag ();
}
If I put hex value directly it works but not from array value? Whats wrong here?
Thanx in advance
View Replies !
View Related
Trying To Manipulate A Color Object
I am trying to create a color object that I can manipulate via sliders during my movie. I've got the sliders in place but can't seem to find any tutorials on manipulating color objects. I found one here in FlashKit which I really don't want to use if I don't have to (long drawn out function), now if that's the only way to manipulate the RGB values.. then that's what I'll have to do; just hoping that some of the "old school" could show me the light.
thanks in advance
View Replies !
View Related
Is It Possible? - Expression = New Color(); Object? How?
I'm setting up a new color object but I want the name to be dynamic. i.e..
expression = new Color(target);
or
"name" add variable = new Color(target);
Unfortunately this doesn't work. Is there a way around this? I also would like to set colors with a dynamic name.
"name" add variable.setRGB(0xXXXXXX);
But no luck there either. Any ideas? Thanks,
Paul
View Replies !
View Related
Help Set Object Color Using LoadVariablesNum
Hi there,
I have try to change the color or an object using loadvariable.
in the action:
loadVariablesNum ("load.asp", 0 );
c = new Color( fhair1 );
c.setRGB( parseInt(haircolor,16) );
and in the load.asp file, i have return a value of:
haircolor=0x0099cc
i can obtain the haircolor value without any problem,
but, somehow when i use setRGB(); it always give me
a black. tried with using parsetInt() function.
but, still doesn't work, anyone know how to convert
a string to a color??
View Replies !
View Related
Is There A Need To Delet Color Object?
If I have say 1000 movie clips on screen and I have a function where I create color object for each one to change them to different color, should I delete the Color object (by setting it to null) when I am done? It seems like if I don't I will be creating lots of color objects as the movie is running and changing the color of the movie clips.
e.g.
// this function is being called a lot
// will I be creating lots of color object over time?
function ChangeColor()
{
for (var i = 0; i < 1000; ++i)
{
var col = new Color("movie" + i);
col.setRGB(Math.random() * 0xffffff);
// should I do below?
// col = null;
}
}
Thanks.
- boon
View Replies !
View Related
How To Use Variable In Color Object?
I would like to use a variable in the color object but dont know how to. What I am using is:
myColor = new Color(bg);
myColor.setRGB(bgcol1);
Here the RGB value is stored in the variable bgcol1 which is '0xffffff'. But its not working. I am getting the variable bgcol1 from a database. Is there a way to use the variable in the color object?? I have a book in which I want the pages in different colors and so I have taken a variable bgcol in the database and bgcol1 corresponds to page 1's color and so on. I am being able to get the correct values in the variables but somehow in the color object it doesnt work. Kindly help.
View Replies !
View Related
Tricky - Is It Possible With Color Object?
Dont know if this is even possible to do, but I want to
be able to take an object and change the internal
color, but not the outline. For example, if you had
a nice red picture, but the outline was in black and you only wanted to change the red inside parts (sort of like what you can do with Paintshop pro), is there anyway to do this. I cant create a seperate background for the inside color like the flashmx car example uses because these will be dynamically loaded images. Perhaps there is no way. Any ideas?
thanks in advance!
View Replies !
View Related
One New Color Object To Rule Them All...
I want to change the color of many different MC instances at once. How can I do this?
Right now I have this code:
onClipEvent (enterFrame) {
textColorObject = new Color(colorMC);
textColorObject.setRGB(_root.textColors);
}
(_root.textColors is a hexdec code variable)
So far, I've tried to name a bunch of clips "colorMC," but that didn't work. What's the best way to target a bunch of instances at once without without having to make a bunch of new Color objects?
THX
View Replies !
View Related
Color Object :: Flash 5 Vs MX
hey everyone,
here's my code:
==========================================
//COLOR MODULE
//set movie to new color, so each one is different
myColor = new Color(movieName);
//get color index
colorIndex = someRandomNumber();
//set the color based on color array and index
myColor.setRGB(colorArray[colorIndex]);
//play the movie!!
movieName.gotoAndPlay(2);
==========================================
alright this thing works great when I publish it as flash 6, but when I publish it as 5, the movie clips all turn out to be black. according to the actionscript dictionary color objects and the setRGB function is native to Flash 5. so what's up!!!??!?!
thanks,
patrick.
View Replies !
View Related
Color Object Question
I have a movie clip that I want to turn red, which is easy. But then I want to remove the color and retain the look of the original movie clip. I'm sure there's an easy way to do this but I can't get it.
note_col = new Color(highhat_mc_array[cc];
note_col.setRGB(0xff0000);
View Replies !
View Related
Color Object Problem
Working with Actionscript 1.0, Flash MX 2004.
All right, I've been working with the Color object for the first time. I've almost got it working how I want it to, but I'm making some kind of error with my naming (at least, I think that's where the error is). Here's the snippet of code that's giving me a problem:
Code:
piece1Color = new Color(piece1)
colorTransform1 = {ra: '0'}
temp = piece1+"Color"
temp.setTransform(colorTransform1);
I have an object called "piece1". I want it to change color, so I've created a new Color object called "piece1Color". I have then created "colorTransform", which I want to be the source to feed the color transform information.
Here's the problem... as it is, this code, when accessed, does not cause piece1 to change color. However, if in the fourth line I replace it with
Code:
piece1Color.setTransform(colorTransform1);
then it works absolutely fine, changing piece1's color to the bluish tint that I desire.
Can anyone give input as to what is wrong? Specifically, why "temp" is not equal to "piece1Color" even though I've specified that it should be?
View Replies !
View Related
Manipulating The Color Object In A MC
I have a MC named i_button residing on my _root timeline. I want to change the color of a movieclip residing inside i_button.
I can easily accomplish this within the i_button timeline by placing an actionscript frame with the following code:
var i_color:Color = new Color(i_background);
i_color.setRGB(0xff9933);
However, I can not manipulate the color of i_background when I move back to the _root timeline. Can someone please help me out with the code to accomplish this.
View Replies !
View Related
Problems With Color Object
When I try to do this with a movie clip (Symbol 1), paint bucketed $FFFFFF:
Quote:
onClipEvent (load) {
var symbolColor = new color ("Symbol 1");
symbolColor.setRGB (0x808080);
trace ((symbolColor.getRGB()).toString(16));
}
The movie clip stays white, and the output window says "undefined." What's going on here?
View Replies !
View Related
Changing An Object's Color
i have this old piece of code:
Code:
if (Number(charinline)<=Number(linelen)) {
duplicateMovieClip("/fx_" add fx add "_0", "char" add i, i);
set("/char" add i add "/letter/lettercolor:char", key);
setProperty("/cursor", _x, Number(startx)+Number(charinline*kerning)-20);
setProperty("/char" add i, _x, Number(startx)+Number(charinline*kerning));
setProperty("/char" add i, _y, Number(starty)+Number(linenum*linespace));
charinline = Number(charinline)+1;
i = Number(i)+1;
}
... which duplicates and places mc named "char[i]" on the stage based on predetermined _x & _y values, now i need to change the color of said mc. how can i do that? i've been trying to find a way but i gave up after 3 hours.
any help will be greatly appreciated
thanks much
- w
View Replies !
View Related
Problem With The Color Object. Please Help.
I just read the tutorial on changing the color of an mc using the Color object. It was very helpful, but left me with one question: is it possible to restore the original colors of the mc? It seems like it gets stuck being monotone after you change it once. Can anyone help?
View Replies !
View Related
Color Object Prototyping In AS 2
hi everybody-
previously, i've been using a MovieClip prototype to create and set a color object, like this:
MovieClip.prototype.setRGB=function(hex){
(new Color(this)).setRGB(hex); //creates color object + sets color
}
which makes it easy to change a MC's color like this:
MC.setRGB(0x00ff00);
now i'm working in AS 2.0, which seems to discourage using prototyping and extending the MC class methods--so my question is, what is the best approach for doing this in AS 2? i've created a new class to handle it, but it seems clunky to have to call an instance rather than having a MC call an internal method...
the bottom line, is: is it ok to extend the MovieClip class in AS2, and if not, what's the cleanest approach?
thanks in advance,
-David
View Replies !
View Related
Changing Object Color With AS
hi I am trying to make a smooth color transition using AS2
the way I have now the mc changes colors just fine, but not smooth like when you use tween. I know there is a 'get Transform' function but I don't know how to apply maybe someone has an example??
Code:
function changeBG(col) {
var c = new Color(_root.bg);
c.setRGB(col);
}
changeBG(0xCC3366);
View Replies !
View Related
Retrieving An Object's Color
Hello,
I'll start of with a little context.
I imported a DAE file (a model) into flash using papervision and give it a texture. For as far as i know, it's not possible to tween color in papervision so i set up a dummy sprite. I tween the sprites' color instead.
Now i need to retrieve the color of the sprite per frame so i can set the texture's color per frame update.
Question: How would i go about extracting the sprites' color?
View Replies !
View Related
Can I Get Some Help With Changing The Color Of An Object?
I'm trying to make the following - I have 5 buttons corresponding to five sections in my Flash movie..I want to make it so, that when I click on a button it background color changes(to show that it was clicked and I'm in that section)...
The button is located inside a movieclip(not in the root timeline)...
For the purpose I converted the background of the button (which I want to change) to a movie clip, so I could use the "setRGB" command, but still I'm doing something wrong and nothing happens...
Can someone explain to me clearly the mechanism of changing the color of a movie clip?
Thanks in advance!
View Replies !
View Related
Problem With The Color Object. Please Help.
I just read the tutorial on changing the color of an mc using the Color object. It was very helpful, but left me with one question: is it possible to restore the original colors of the mc? It seems like it gets stuck being monotone after you change it once. Can anyone help?
View Replies !
View Related
Color Object Prototyping In AS 2
hi everybody-
previously, i've been using a MovieClip prototype to create and set a color object, like this:
MovieClip.prototype.setRGB=function(hex){
(new Color(this)).setRGB(hex); //creates color object + sets color
}
which makes it easy to change a MC's color like this:
MC.setRGB(0x00ff00);
now i'm working in AS 2.0, which seems to discourage using prototyping and extending the MC class methods--so my question is, what is the best approach for doing this in AS 2? i've created a new class to handle it, but it seems clunky to have to call an instance rather than having a MC call an internal method...
the bottom line, is: is it ok to extend the MovieClip class in AS2, and if not, what's the cleanest approach?
thanks in advance,
-David
View Replies !
View Related
Changing The Color Of An Object
Hi
I want to make something like a children's paint book. The user will choose the color from a palette and when she clicks an object, that object will seem in that color.
Anyone knowing a tutorial about it, or any suggestions on how to accomplish this?
Thanks in advance
View Replies !
View Related
[as1]odd Color Object Behaviour, HELP
I'm tring to use a Color object from within a constructor function and it's giving me some grief(See the function below). The Color object just doesn't want to point to the movie clip i tell it to. It correctly receives the RGB value i send it but doesn't cause the designated movie clip to change color. however if i target the parent of that clip "this.mc" the color change takes effect.
I've triple-checked that "circle_mc" is named correctly and exists where it should. Has anyone else had similar issues?
ActionScript Code:
_global.Dot = function (effect, timeline) {
var depth = ++_root.totalDots + _root.dotsDepth;
this.mc = this.attachGraphic(timeline,depth);
this.mc.parent = this;
//*****Color code here*****
this.mcColor = new Color (this.mc.circle_mc);
this.mcColor.setRGB(0x00FF00);
//*****Color code ends*****
this.mc.startDrag(true);
this.mc._visible=true;
_root.dots_arr[_root.totalDots] = this;
}
var DP = Dot.prototype;
DP.attachGraphic = function (timeline, depth) {
var mc = timeline.attachMovie("dot_template","d" + depth, depth);
mc._x = -500;
mc._y = 500;
mc._visible = false;
return mc;
}
Thanks in advance,
J.J.
View Replies !
View Related
Retrieving An Object's Color
Hello,
I'll start of with a little context.
I imported a DAE file (a model) into flash using papervision and give it a texture. For as far as i know, it's not possible to tween color in papervision so i set up a dummy sprite. I tween the sprites' color instead.
Now i need to retrieve the color of the sprite per frame so i can set the texture's color per frame update.
Question: How would i go about extracting the sprites' color?
View Replies !
View Related
Color Object - Why Doesn't This Work?
Hi,
I've got a movieclip of which I want to change the color. I want to start from black then jump to blue and from there I want to change to green, to yellow, to red. Using steps of - or + 51 in the RGB-scale.
This is the code on the clip:
onClipEvent (load) {
//Mouse.hide();
// maak kleurobject voor deze clip
clip_kleur = new Color (this);
}
onClipEvent (enterFrame){
// check de kleur van deze clip
get_clip_kleur = clip_kleur.getRGB();
}
onClipEvent (mouseDown) {
hexColor = get_clip_kleur.toString(16);
trace(hexColor);
// als deze clip zwart is
if (get_clip_kleur == 0x000000){
// spring naar blauw
clip_kleur.setRGB(0x0000FF);
} else if (get_clip_kleur > 0x00FFFF && get_clip_kleur < 0x00FF00) {
//anders maak mc groener
_root.actie_groen();
updateAfterEvent();
} else if (get_clip_kleur > 0x00FF00 && get_clip_kleur < 0xFFFF00){
// maak mc geler
_root.actie_geel ();
updateAfterEvent();
} else if (get_clip_kleur >= 0xFFFF00){
// maak mc roder
_root.actie_rood ();
updateAfterEvent();
} else {
// anders maak mc blauwer
_root.actie_blauw ();
updateAfterEvent();
}
}
These are the functions on the main timeline that are being called:
function actie_blauw(){
actie_clip = new Color("_root.ball");// moet nog dynamisch gemaakt
actie_kleur_trans = new Object();
actie_kleur += 51;
actie_kleur_trans.rb = 0;
actie_kleur_trans.gb = actie_kleur;
actie_clip.setTransform(actie_kleur_trans);
}
function actie_groen(){
actie_clip = new Color("_root.ball");// moet nog dynamisch gemaakt
actie_kleur_trans = new Object();
actie_kleur -= 51;
actie_kleur_trans.rb = 0;
actie_kleur_trans.gb = 255;
actie_kleur_trans.bb = actie_kleur;
actie_clip.setTransform(actie_kleur_trans);
}
function actie_geel(){
actie_clip = new Color("_root.ball");// moet nog dynamisch gemaakt
actie_kleur_trans = new Object();
actie_kleur += 51;
actie_kleur_trans.bb = 0;
actie_kleur_trans.gb = 255;
actie_kleur_trans.rb = actie_kleur;
actie_clip.setTransform(actie_kleur_trans);
}
function actie_rood(){
actie_clip = new Color("_root.ball");// moet nog dynamisch gemaakt
actie_kleur_trans = new Object();
actie_kleur -= 51;
actie_kleur_trans.rb = 255;
actie_kleur_trans.bb = 0;
actie_kleur_trans.gb = actie_kleur;
actie_clip.setTransform(actie_kleur_trans);
}
The problem is that only the blue to green functions works, the hexColor gives this output:
0
ff
33ff
66ff
99ff
ccff
ffff
After that it should shift to diminishing the green but it jumps to yellow, this is the output:
132ff00
ffff00
ffcc00
ffff00
ffcc00
ffff00
ffcc00
etc.
Example here: http://home.wanadoo.nl/d.roberts/stuff/kleur_test.html
Can someone please give me a clue where things are going wrong?
Thanks very much for your time.
Regards, Danielle.
View Replies !
View Related
Can You Dynamically Color A MovieClip Object?
Hi all,
i am trying to dynamically color a movieClip instance name "square" by using string variables
the following code tints the movieClip a shade of orange
========================
var squareColor = new Color("square");
squareColor.setRGB(0xff9900);
========================
no problem, but i would like to define the "0xff9900" part elsewhere, maybe from a DB or a text file say.
so am trying the following code and i cant seem to get it to work
========================
userChoice="0xff9900"
var squareColor = new Color("square");
squareColor.setRGB(userChoice);
========================
does anyone have any ideas on how to get this to work??
thanks in advance
gilesb
View Replies !
View Related
|