Re: Kir's imports [Added SWF import: China Dress with breasts slider support]
In theory it should be possible to add code to one part to track the color of the other. I'd have to play around with it to find out, though.
EDIT: Okay, I've managed it, but it's on an individual basis (eg [bottoms]>[right thigh bottoms]), forcing me to copy-paste the code a bunch of times, which is not what I want. Unfortunately, making a loop in the parent component (eg [bottoms]) doesn't seem to work.
Well, here's the code anyway. Note that this code assumes that you've actually named your components.
import flash.events.Event;
import flash.display.MovieClip;
var top_back = MovieClip(MovieClip(DisplayObjectContainer(root).getChildByName("top")).getChildByName("back")).getChildByName("rgbFill");
addEventListener(Event.ENTER_FRAME, followColorSlider);
function followColorSlider(e:Event) {
rgbFill.transform.colorTransform = top_back.transform.colorTransform;
}
EDIT: And this is the parent code that doesn't work. Maybe someone can figure out what I'm doing wrong, because it seems like it
should work.
import flash.events.Event;
import flash.display.MovieClip;
var top_back = MovieClip(MovieClip(DisplayObjectContainer(root).getChildByName("top")).getChildByName("back")).getChildByName("rgbFill");
addEventListener(Event.ENTER_FRAME, followColorSlider);
function followColorSlider(e:Event) {
for(var i:unit = 0; i < this.numChildren; i++) {
MovieClip(this.getChildAt(i)).getChildByName("rgbFill").transform.colorTransform = top_back.transform.colorTransform;
}
}