Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: REPOST: setRGB |
From: | EchoDotCom Designs. |
Date: | Fri, 20 Oct 2000 14:40:05 +0100 |
I sent this yesterday, but in 24hours, I have neither seen the email I sent,
nor any replies. I am assuming it didn't go through. If it did go through,
please forgive the repost.
___________________________________________________original message
I am trying to make an object set it's color depending on it's name. I have
a series of squares that make up a color chart, these squares will be named
after the color that they will represent, however I would like to use only
one movie clip to do this. when the movie clips are clicked on, they should
then set something else to the color that there names represent. this is the
code I would think would make it work... needless to say it doesn't, and I
can't seem to figure out a work around.. .any thoughts
MC Instance name _root.0xFFCCFF
onClipEvent(load){
thisColor = new Color(this);
thisColor.setRGB(_name);
}
inside the MC is a button with this as the code:
on(release){
newColor = new color(_root.stockColor);
newColor.setRGB(_name);
}
I have also tried: newColor.setRGB(this._name);
in either case I end up with black(this library item is actually white).
however if I put in a hex value (instead of _name) it works fine. but this
will mean either writing an onclipevent(load) for each of the swaths (about
60 of them), building a masive if elseif structure (i havn't noticed a
switch function in actionscript), or having a separate button for each
(equally as daunting) any ideas?
-Scott McDonald
Morris Publishing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]