Boyd,
I'm not sure if this is exactly what you are looking for, but I used
this set-up in a previous project. CMOval.Hilights was the movie clip
that I wanted to change the color of. <Watch for line breaks.>
Flash movie:
Two frames, both containing a movie clip of my element.
Frame 1 containing following script:
------------------------------------------------------
// Variables set by Director
var r = 0;
var g = 0;
var b = 0;
var amt = 0;
//
// Function to change the tint of the oval
// r g and b are values from 0 - 255
// amount is a percent from 0 - 100
//
function setTint(r, g, b, amount) {
var percent = 100 - amount;
var trans = new Object();
var ratio = amount / 100;
var toChange = new color(CMOval.Hilights);
trans.ra = trans.ga = trans.ba = percent;
trans.rb = r * ratio;
trans.gb = g * ratio;
trans.bb = b * ratio;
toChange.setTransform(trans);
}
// Stop the playback
stop();
-------------------------------------------------
Frame two script:
// Sets the tint last passed in
setTint(r,g,b,amt);
gotoAndPlay(1);
---------------------------------------------------
Now, in Director, when I wanted to change the color of my Flash object's
CMOval.Hilight, I would call the following:
sprite(1).setVariable("r", "0")
sprite(1).setVariable("g", "255")
sprite(1).setVariable("b", "0")
sprite(1).setVariable("amt", "25")
sprite(1).callFrame("SetTint")
updatestage
Once the Flash movie has been set up, it's pretty easy to create a
handler in Director that would just set the rgb/amount variables and
call "SetTint" to refresh the color. I can post a sample movie if there
is interest. For the situation I had, this was really the only thing I
could come up with.
Brian Romanko
Lead Developer - Neo/SCI Corporation
Member - Greater Rochester Macromedia User Group
-----Original Message-----
Would anyone be able to suggest how I can change the color of a
movieclip in a Flash asset inside a Director movie (with lingo)??
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]