SetRGB Problem
Hi There - Every time I move the mouse, I want a movieClip attached to the stage from the library. Each time it hits the stage, I want it to be a random colour from the choice from my Array. Only the first movieClip to arrive - has the chance to be 'another colour, from the code below.Any Tips on using the setRGB function???? It is that that seems tangled up in my code at the moment..... Code: var a:Array = new Array("0x66FFFF","0x333333");var ear:Object = new Object();function line(){ num = Math.floor(Math.random()*2); _root.attachMovie("square","square_mc",this.getNextHighestDepth()); var colorful = new Color("line_mc"); colorful.setRGB(a[num]); }ear.onMouseMove = function(){ line(); };Mouse.addListener(ear); Thanks!
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-09-2008, 07:33 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
SetRGB :: Reset Button From SetRGB
I'm setting up a nav with buttons so that when you click on a button, it's color changes with setRGB so that the color stays when it is not being hovered.
I'm trying to figure out how to reset it. I have a script going that will change it back to white using setRGB when another button is selected, but then I lose the actual rollover effect in the button.
Is there something like a resetObject or anything?
I'm in MX'04 and have attached a file.
Thanks,
C.
How To Se SetRGB
How do i use the setRGB thing? i want to change the color of my random duplicating movoe clip which is insode another which randomly moves about the stage. the instances are as follows
_level0.back.move.again
back and agian have a alpha value of 0 so there is only again left to modify.
.setRGB -
I do a .setRGB to a mc but then want to put a label on the MC -- since the .setRGB sets the color of the whole movie clip, my text is the same color and hence, does not show up -- how do I prevent this or can I force the color of the text.
SetRGB
i have a MC which changes the colour of the MC (instance name toolbar) on stage.
it changes the colour but when the "close setting box" button,"cross box on the corner" the colour changes back to the original...
please have a look at my SWF then click"setting"
http://www.gomi.btinternet.co.uk/3g.htm
thank you
10reynard
SetRGB
when I create a new Color object and using setRGB to change the color of a movieclip, is the stroke color affected as well? (I assume it does...is there a way to avoid it other than putting the stroke outside the movie clip?)
Thanks
I Need Some Help W/ SetRGB - PLEASE
Okay, this seems to be something quite easy to do, but for some unknown reason can't seem to get it working as of yet...
I have a series of menu options that are used as navigation on a web site and opens in a series of drop downs:
http://www.webryder.com/sureshot/index_main.html
What I want to be able to do is rather simple - when the user is on a certain page, have the option on the right hand side a different text color. Inside of the button, there is a movie clip which is simply the text and called 'about_us_movie' - which I want to turn red once clicked on... so set the followoing:
on (release) {
getURL("about_us.html", "main");
colorit = new Color(_root.about_us_button);
colorit.setRGB(0xFF0000);
}
Yet it doesn't want to work! Any suggestions?
Cheers,
Shawn
SetRGB
Hello,
I am trying to set the colour of a movie clip using:
bg_color = new Color(this);
bg_color.setRGB(_root.color);
I have in the passed used this code which worked fine in Flash v5 but not with MX:
bg_color = new Color(this);
bg_color.setRGB(parseInt(_root.color, 16));
The strange thing is that if I use:
bg_color = new Color(this);
bg_color.setRGB(0x000000);
It works but using a variable with the exact same contents (0x000000) it doesn't!
SetRGB
i want to load an external variable (with the value 0 or 1) and then if its value=0 sets the RGB properties from a movieclip to for exemple #ff0000, if value=1 sets to #00ff00. so, i've tried it with an "if" action, but it doesn't work well!!
you can help me?
thanks
SetRGB?
I cant work out why the color of the moviclip wont change?
heres the code
on (rollOver){
col1=new Color(__root.technology.complex_packing.complex_pa cking.center)
col1.setRGB=(0xFFFFFF);
}
.setRGB
I have a one frame flash movie. This movie takes the value of a dynamic text field and uses that value to change the colour of a movie clip. The movie clip is on the same frame as the text field. and works as it should do.
Here is the actionscript im using :
strColor = "0x" + _root.insText.text;
// insText = the instance name I gave the text field
objColor = new Color(_root.headerFlash);
// headerFlash = the instance name I gave the movieclip
objColor.setRGB(strColor);
I've also got a HTML page which has <BODY onLoad="fnFlashPassValue('0000FF')">
The function "fnFlashPassValue('0000FF')" takes 1 argument and changes the "insText" text field in the flash animation to its value. Which also works fine.
The problem is putting it all together, as im trying to update the "headerFlash" movieclip to change colour to the updated value of the "insText" text field.
How can I do this?
Any help appreciated.
Mark
SetRGB
OK I have a MC I want to change to the color blue, then I could use the setRGB command on the MC. And yes, there's plenty of other ways to achieve this result. The reason for using this example is that
- is there a way to extract the color value from a MC that has been colored in this way? Presuming that the colorValue = 255 isn't yet know, but that's what we want to find out.
code: colorValue = 255
SampleClip = new Color(this);
SampleClip.setRGB(colorValue);
SetRGB
hey guys,
I'm having trouble setting the color of movie clips that I created with createEmptyMovieClip. Is there any way to do this?
SetRGB
Hi there
Ive got a moviclip in the Library = Myfill
How can set the color in main timeline 1. frame with AS3
Regards
flemming
SetRGB
I have two clips one inside the other. I want to set the RGB of both but it doen't seem to want to. Is this because I have set the RGB of the parent clip.
ActionScript Code:
function setStyle(clip:MovieClip,color:String):Void{
var strColor:String;
var objCol:Object;
switch(color){
case "global":
strColor="0x000000";
break;
case "outline":
strColor="0xFF0000";
break;
}
objCol=new Color(clip);
objCol.setRGB(strColor);
}
setStyle(box.arrow,"outline")
setStyle(box,"global");
SetRGB
Hi,
I am writing an application, that when you click on a image in the movie clip it highlights the image red using the setRGB function. Then when you click away I want it to go back to its original state (black). However, if I simply set the RGB to black it makes the image blocky and undefined. Is there anyway to remove the RGB that is sitting on a movie clip so only the original image is showing?
cheers
Help With SetRGB
How do I get secondColor to not go into action, but to standby for use?
PHP Code:
thisOne = [navigation.s1, navigation.s2, navigation.s3, navigation.s4];
for (i = 0; i < thisOne.length; i++) {
var mainColor:Color = new Color(thisOne[i]);
mainColor.setRGB(linkColor);
var secondColor:Color = new Color(thisOne[i]);
secondColor.setRGB(hoverColor);
}
SetRGB
hi,
i m using setRGB method for changing the color of a movieclip after click.
but when the user clicks on another number i want to set the RGB values to its original color.
how would i do this??? pl pl help...
Quote:
_root.smallmc_mc[mc].onRelease = function() {
for (var p = 0; p <= imagesLength; p++) {
if(this._name == "number"+p)
{
var my_color:Color = new Color(this);
my_color.setRGB(0xFF0000);
}
Is there anything like clearRGB or something that will return the button to it's original color?
i tried using "this.clear" method but not working!!
Setrgb
on (press) {
sel_colors = _root.combocolors.getValue();
//loadMovie(_root.catalog["object"]+sel_colors+".swf", "object_image2");
_root.colors.text = _root.catalog["object"]+sel_colors;
if (sel_colors = red) {
c = new Color(_root.catalog["object_image"+selected]);
c.setRGB(0xffffff);
}
}
SetRGB
I have tabs that when they are clicked, change color, don't want to use tweening I want to use actionscript.
how is this done, i have a basic idea, but not clear on a few things.
Do i have to create a new Object?
Then do I have to set the RGB?
Many thanks in advance
SetRGB
hi,
i have a movie that changes the colour (with set RGB) and now my question:
is it possible to do the same in CMYK-colours to print it (in the same colors which are setted in the movie)!
thx4help
Raven#3
SetRGB
can anyone tell me whats wrong with this?
Code:
// when you rollOver
projects.onRollOver = function()
{
// create an onEnter
this.onEnterFrame = function(){
project.setRGB(0xff8040);
}
}
// when you rollOut
projects.onRollOut = function()
{
this.onEnterFrame = function(){
project.setRGB(0xffffff);
}
}
SetRGB
I've read through some other threads concerning colorchanging and if I'm right, what I'm about to ask can't be done but if it can't be done, my next question would be, do you know of any alternative?
Okay here goes.
I've got a movieclip on my main timeline and in the movie I have a transparant button.
Now, when the button is pushed, I want the movieclip to change colors...
But unfortuntly when I do so, it doesn't do a thing...
Here's the code for my button...
Code:
on(release){
unloadMovie("_root.emptyMC");
loadMovie("main.swf", "_root.emptyMC");
_parent.backgroundClip.gotoAndPlay("grey");
button1 = new Color(buttonMC1);
button2 = new Color(buttonMC2);
button3 = new Color(buttonMC3);
button4 = new Color(buttonMC4);
_root.button1.setRGB(0x00CC00);
_root.button2.setRGB(0x00CC00);
_root.button3.setRGB(0x00CC00);
_root.button4.setRGB(0x00CC00);
}
I've already tried with _root.buttonMC1 etc aswell
SetRGB
Does
Code:
setRGB
work when you attach movie clips? ..
Does'nt seem to pick up the identifier of the mc.
I'm using
Code:
on (release) {
var colorful = new Color("mc identifier name");
colorful.setRGB(0xCCCCCC);
}
Any ideas
Thx
SetRGB
Hey all i need to know how to setRGB.
I want to fool around with that code to see what i can do wity it
Well i hope someOne can help..
SetRGB()
I'm trying to change the color of the attached clips I am using some oop coding where the color class is the child class and the Menu class is the parent everything is working in the class department the problem is the color object I think.
Code:
#include "scripts/menu.as"
MenuColor.prototype = new Menu();
// I place the orignal paremeters + the new paremeters in here
function MenuColor(clip, startx, y, alpha, b) {
super(clip, startx, y, alpha);
this.clip = clip;
this.b = b;
this.colArray = [0x636D87, 0x993366, 0xFF3300, 0x99CCFF, 0xFF99CC];
// this will forward the orignal paremeters to the parent class
}
MenuColor.prototype.update = function() {
super.update();
this.setColor();
};
Menu.prototype.setColor = function() {
this.col = new Color(this.clip);
for (var i = 0; i < this.colArray.length; i++) {
this.col.setRGB(this.colArray[i]);
trace("THE col :"+this.col);
}
};
var color = new MenuColor();
The setColor Function is where it is not working. can anyone please help thanks
SetRGB With A Variable Help
I have a bunch of movie clips. I wnat each ones color set when that frame is loaded.
Can I do that with a variable?
like....
clip1.setRGB(color1)
clip2.setRGB(color2)
color1 = 000000
color2 = ffffff
So instead of
onClipEvent (load) {
new_color = new Color(this);
new_color.setRGB(0x000000);
this.clip1= 0x000000;
}
Duplicate Mc, SetRGB
I'm trying to set the rgb of a duplicated movie clip, can anybody let me know what i'm doing wrong with this code:
// set variable for the counter
count = 1;
//duplicates a movie clip (promted by a mousedown elswhere)
function dupe() {
if (count<20) {
//duplicates the movie and alters its position randomly
_root.mcSquare.duplicateMovieClip("mcSquare"+count , count);
_root["mcSquare"+count]._x = random(550);
_root["mcSquare"+count]._Y = random(400);
this next line doesnt work its meant to change the rgb
value of the new movieclip - this is the line i need fixing
myColor = new Color["mcSquare"+count];
myColor.setRGB( 0x663366 );
// knowing what the movie name will be this next line does work!
myColor = new Color(mcSquare1);
myColor.setRGB( 0x663366 );
// adds 1 to the counter
count++;
--
hope you can help
cheers
fathom
SetRGB Problems
Hi everybody......
Ok, trying to get a mc to change colour when a button is clicked, using the setRGB command.
This script is on the timeline...
o = false;
backColor = new Color("background");
backcolor.setRGB(0xCCFF66);
if (o = true) {
backColor.setRGB(0xFF6600);
}
.....and this is on the button........
on (release) {
o = true;
}
When the movie is played the colour is automatically set to 0xFF6600 (a nice shade of orange), even though "o" is set to false. Where am I going wrong guys??
How To .setRGB With A Variable?
I'm trying to set the color of a Movieclip ("tc") using setRGB. The problem is that the variable that determines the color is in a format like: "FFFFCC". How do I add the "0x" and use it in a setRGB statement? So far this is what I have:
This works (however, it uses a set value instead of the variable):
testy = 0xCCCC66;
teamcolor = new Color("tc");
teamcolor.setRGB(testy);
This does not work:
testy = eval("0x" add "CCCC66");
teamcolor = new Color("tc");
teamcolor.setRGB(testy);
Nor does this:
testy = Number("0x" add "CCCC66");
teamcolor = new Color("tc");
teamcolor.setRGB(testy);
Or this:
testy = "0x" add "CCCC66";
teamcolor = new Color("tc");
teamcolor.setRGB(testy);
Any ideas? Seems trickier than it looks!
SetRGB Problem :(
Hay.
I'm trying to make a smart mc where u specify the color of something, like a loader bar for example :
and i have in the Smart MC BarColor=ff9966
but the setRBG needs the 0x so what should i do ?
it's not working to include the 0x with the ff9966
and this thing also doesn't work :
test = "0x" add BarColor;
mcbar = new Color(bar);
mcbar.setRGB(test);
so help me guys
Dynamic SetRGB
has anyone been able to dynamically place RBG values into variables? i have tried various ways numerous times, and it never works (the target clip always turns black). it can be confusing becuz my code usually returns a value, so it appears it *should* be working.
here is an example:
//
myColor = 0xCCFFCC;
presentColor = new Color("currentColor");
presentColor.setRGB( myColor );
//
note i made the value an expression. i have tried setting it as both expression and as a string.
is dynamically placing values for setRBG not possible? it seems strange if that was the case.
currently my workaround is using large "if" statements, but is much less desirable.
any help would be much appreciated. thanks!
aaron
SetRGB And Fading
Hi guys,
I have a problem with fading colors. Ie they wont fade into each other.
Reference movie - http://www1.vivid-design.com.au/clientpreview/test/
OK What i want to do, for example, is On Mouse Over of "products" fade from the "green color" on the "Company" section to the "Orange color" of the "products section". and on mouse off, return the slider bar to the last option that was clicked and fade the color back to the appropriate section color. I'm sorry if this sounds confusing, but any questions, just ask and I'll explain.
Here is my code:
In the _root in an actionscript layer in Frame 1:
Code:
Math.easeInOutQuad = function (t, b, c, d) {
if (t<d/2) {
return 2*c*t*t/(d*d)+b;
}
var ts = t-d/2;
return -2*c*ts*ts/(d*d)+2*c*ts/d+c/2+b;
};
Math.ColorFade = function(pos, final, initial, num) {
*
for (j in initial){
slide.deltaColor[j] = (final[j]-initial[j])/num;
}
*
slide.color.setRGB((deltaColor.red*pos+inital.red)<<16|(deltaColor.green*poss+inital.green)<<8|(deltaColor.blue*pos+inital.blue));
*
};
// on the MC "slide":
onClipEvent (load) {
numFrames = 15;
*
initialColor = new Object();
initialColor.red = 255;
initialColor.green = 255;
initialColor.blue = 255;
*
finalColor = new Object();
finalColor.red = 255;
finalColor.green = 255;
finalColor.blue = 255;
*
deltaColor = new Object();
*
clickedPos = -8;
color = new Color(this);
*
}
onClipEvent (enterFrame) {
*
colorPos++;
if (colorPos <= numFrames) {
Math.ColorFade(colorPos, finalColor, initialColor, numFrames);
}
*
t++;
if (t<=duration) {
this._y = Math.easeInOutQuad(t, start, end, duration);
}
}
// n the "company button" :
on (rollOver) {
slide.t = 0;
slide.start = slide._y;
slide.end = 13-slide._y+8;
slide.duration = 15;
slide.finalColor.red = 138;
slide.finalColor.green = 223;
slide.finalColor.blue = 38;
slide.colorPos = 0;
}
on (rollOut) {
slide.t = 0;
slide.start = slide._y;
slide.end = slide.clickedPos - slide._y + 8;
slide.duration = 15;
}
on (release) {
slide.clickedPos = 13;
slide.clickedRGB = "8ADF26";
}
Any help is much appreciated, thanks,
Brad
SetRGB Problem
I have 4 buttons across the top of a flash movie which control the navigation to 4 seperate pages. The buttons are just text and are grey and roll over to red. I want to make it so when a user clicks on a button the text color changes to white until they go to a different page then it would change back to grey and the new page's button would turn white. I've tried setRGB but the problem I have is that even if I use setRGB again to return the button back to grey my roll over no longer works. Is there any way to cancel the RGB color when a user leaves the page? Is there any way to get the effect I want through scripting so I don't have to make a movie for my buttons and then a keyframe for each where it is whitened?
Variable SetRGB
I have a movie clip where I want to set the color from a variable out of the database I've tried
myColor = new Color(this.skull.faceskin);
myColor.setRGB(_parent.skincolor);
where skincolor is 0x3399ff and all I get is black.
I can trace the value of the variable from where I'm trying to set the color and it reads just fine, but steRGB just doesn't seem to want to accept a variable.
Anyone know a way around this?
Help Me To Reverse SetRGB
Once a movieclip has been set to a colour using:
on (release) {
myColorObject = new Color(_root.shirt);
myColorObject.setRGB(0x009900);
}
Is it possible to reverse this without applying another colour???
Thanks in advance
Oll
Problems With SetRGB
So here's my code:
Code:
_global.setNoteColor = function(object, newColor) {
var newNoteColor = new Color(object.note.noteIcon.arrowIcon);
var newColor = "0x" + newColor;
newNoteColor.setRGB(newColor);
}
The first time this function is run, the color is set fine. But only the first time ... after that the color won't set anymore.
The way this thing works is that 6 arrows are created on the screen and as they're created, this function is called to set their color. I pass a reference to the arrow and the new color it's supposed to be. Like I say, the first arrow's color is set fine, the rest don't show.
I've tried creating an array of references to the newNoteColor objects, I've tried setting the "new Color" in the arrowIcon itself and then referencing that instead ... each time only the 1st instance of the arrow changes color.
Anyone ever seen something like this before?
If anyone's interested, you can view the page at:
http://67.116.218.117/cube6/review/flash/main3.html
See that first blue arrow over on the left, that's the only one that'll change ...
Thanks,
Camryn
A SetRGB Problem
I'm sure this has been covered somewhere, but I can't seem to find what I need....
The senario:
Frame 1 of scene 1 contains 5 buttons inside mc's called p1 to p5
At the moment, I have set the color of each mc with
myColor=new Color(p1)
myColor.setRGB(0xff0000)
and so on
I will eventually be setting these colors randomly, rather than hardcoding them
what I am attempting to do as part of the game i am developing, is, for example, when I press p3, I want to be able to change the current color of p2 to be the color of p4
this works fine if I hard code, in the same way as above, but what I wanted to do was something like
myColor=new Color(_root.p2);
myColor.setRGB( get the color of p4 )
is this possible? I am using Flash 5
JennyJ
Can I Undo A SetRGB?
I need to on the one hand apply a setRGB to a movie clip, but then remove the effect to see the original colours again...
The reason is: I am using setRGB to set the colour of a string of forms/pages within a movie clip, but a few pages need to have several colours within them, for drop-downs etc.
I can think of some very painful work-arounds (second clip over the top etc), but if a "setRGB Undo" exists it would save hours and hours and hours.......
Thanks,
Keri
SetRGB With Variable
Hi,
I want to change the color of a movieclip with a variable from another level. Here's the code:
// retrieve color for uur on level 5 using .toString(16)
kleur_no = _level5.uur.cover_kleur; // yields someting like: "4b6496"
// make cover_mc color object
cover_color = new Color ("_root.cover_mc");
// color cover_mc
cover_color.setRGB(parseInt(kleur_no, 16));
// check the color
//kleur_no = cover_color.getRGB(); // when I check this I get undifined
stop();
So, my mc just turns white. Something goes wrong when I try to set the RGB. Can someone help?
Thanks a lot in advance, Danielle.
Removing SetRGB()
here's what i got:
code:
onClipEvent (load) {
myColor = new Color(this);
onPress = function () {
myColor.setRGB(0xff0000);
};
onRelease = function(){
//remove Color?????>
}
}
if turns red....that's fine, but how do i get it to go back to it's orginal colors meaning it has multiple colors and using setRGB(*original Color*) won't work b/c it sets the WHOLE movie clip to one color......any suggestions?....thanks in advance
Random SetRGB
Is it possible to setRGB to randomly generate a colour?
Thanks
hearse
SetRGB Using Variables
How would you go about using a variable to setRGB? Here I've created a mc "ball" and have three variabe that can be changed, "red", "green" and "blue". I've combined the variables in the "value" variable and tried to apply them in setRGB, but it ain't workin'.
red = "ff";
green = "00";
blue = "00";
value = String (["0x" + red + green + blue]);
colorChange = new Color (_root.ball);
colorChange.setRGB (value);
trace (value); has the hex number appearing properly, but the setRGB refuses to use it. Any help would be appreciated.
SetRGB Problem
I had an menu with 5 buttons, when i click in one i want give for it a specific rgb, but wen i click in anothe one i need back the last for the real color, this is working....but the button lost the rollover effect:
sample...
www.agenciax.com/clientes/lima_netto
click in the following buttons
"escritorio" and "Área de atuação"
my coide are
button:
on(release){
_root.cores_secao("_root.bt_areas","0xCAA7BF");
}
and the function:
function cores_secao(alvo,rgb){
secoes = new Array("bt_escritorio","bt_profissionais","bt_areas ","bt_servicos","bt_informativo","bt_business" );
for(i=0;i<secoes.length;i++){
cor_n = new Color(secoes[i]);
cor_n.setRGB(0x666666);
}
cor = new Color(alvo);
cor.setRGB(rgb);
}
how back my button to original color without lost the mouse over effect???
Help, SetRGB Problem
this makes no sense to me. I have an MC with a bunch of graphics in it, and a graphic that upon loading creates a color object out of itself.
outside of the MC there is a button which has the following on it:
Code:
on(release){
_level2.stage.body.theColor.bodyColor.setRGB(0x663399);
}
_level2 is because the entire swf is loaded into a bigger movie. Anyway, the button works fine, and changes the color to purple like it should.
Problem is, i don't want to color change triggered by a button; but by the timeline at a specific moment.
Simple enough i figured... i just nixed the on(release) and put the following into the same timeline the button was sitting on
Code:
_level2.stage.body.theColor.bodyColor.setRGB(0x663399);
yet it no longer works. I don't get it. The MC that requires changing is already loaded at that point, as are the colorObjects.
SetRGB And FADE
ok i know how to set a MCs colour using the setRGB command
code:
myColour = new Color(this);
myColour.setRGB(0xCCCCCC);
but instead of the colour just changing is there a way to fade the change like a tweening from one colour to the new colour!
thanx in advance!
SetRGB & Hex Value From Mysql
I change the color of a movie clip, using the next code:
code:
col=new Color(mcBackground);
mcbgcolor=0xff0000;
col.setRGB(mcbgcolor);
this code works fine...
But now i want to change the color, to a color placed in my database.
My database contains a record with a value ff0000.
i have a php file with output &mcbgcolor=0xff0000.
I load the mcbgcolor value to flash using LoadVars, but i can't get the movieclip to change color...
Is this because mcbgcolor is a string and not a hex value??? I tryed tehe Number(mcbgcolor) statement, but this won't word ...
SetRGB Without Button?
I'm trying to use setRGB on an attached mc instance, but without a button, and can't get it to work (the instance stays its original color). Seems like it must be possible, but what am I missing?
code:
var bgColor:Color = new Color(contBgLeft_mc);
function contBgLeft() {
contBgLeft_mc = attachMovie("contBg_mc", "contBgLeft_mc", 0);
contBgLeft_mc._x = 0;
contBgLeft_mc._y = 0;
bgColor.setRGB(0x99CCFF);
contBgLeft_mc._alpha = 0;
contBgLeft_mc.alphaSpeed = 2;
contBgLeft_mc.onEnterFrame = fadeIn;
}
SetRGB & GetRGB
Hey all.
Alright, I'm having a weird problem. This is what's going on. I have a circle mc, with the instance name of "ball". Now when you move the MC with the arrow keys, it dynamically leaves a trail effect.
Click here to view it
(use arrow keys to navigate)
Okay, notice that the original circle is constantly changing colors. That is not done dynamically, it is just tweens within the MC. Also notice that the trail is constantly the same color.
What I am trying to do is, using setRGB and getRGB, to make it so that the trail MCs are always the same color as the original "ball" MC. My code for attaching the new clips is as follows:
code: _root.attachMovie("ball","ball"+ballNum,ballNum);
_root["ball"+ballNum]._x = _root.ball._x;
_root["ball"+ballNum]._y = _root.ball._y;
ballNum ++;
if(ballNum>=10) {
ballNum = 0;
}
Now after the third line, I added the following:
code: theColor=new Color(_root.ball);
theColor.setRGB(0xFF00FF);
newColor = theColor.getRGB(_root.ball).toString(16);
setColor=new Color(_root["ball"+ballNum]);
setColor.setRGB(newColor);
Now I figure this should word, and when I test it out using trace, newColor gives me a value of "0xFF00FF", which is correct, yet when I test to see what newColor is after the last line, it gives me a value of "0". Which is quite odd to me.
Any help would be greatly appreciated.
SetRGB() [color]
I need to separate the highlights from the shadows in the chair images. Should I use three different mc for each? I know how to use the setRGB() command to colorize the chair. How do I show the detail in the chair instead of it looking like a blob of color?
Click the button that reads: "Customize It".
http://www.sunbriteoutdoorfurniture....id=B-150&cid=1
|