Targeting issue and NextHighestDepth()

flashwillkill
Sun, 17 Jul 2005 16:48:40 +0000

Hi everyone,
I am trying to built an API/white board thingy …
and would like to create kind of a stamp/clone tool, putting multiple
instances of a star on the stage.
There is also a color palette that changes my fillColor. Right now I have:

holder = _root.createEmptyMovieClip("container", 200);
star_stamp.onMouseDown = function() {
	if (star_stamp.isActive) {
		var r = holder.attachMovie("star", "star", holder.getNextHighestDepth());
		r._x = _root._xmouse;
		r._y = _root._ymouse;
		new Color(r).setRGB(fillColor);
	}
};

Everything works, except when I choose a color and MouseDown on the stage,
the initial r changes the color and not the new r (if that is understandable ???)
I just cant figure out how to target the new instance of r. Is there a way to do so???

Thanks for any advice and help.

Read full topic