Actionscript stroke and fill painting

I have a vector shape of a country map that is a movieclip with only a black stroke color and a green fill color.

I want to change using Actionscript ONLY the fill color to another color.

I’ve tried to do it with the object properties (see example), but it paints all the map including the stroke path, and then I lost the black stroke.

// Method to paint
Country.prototype.paint_country = function(whichColor) {
c = new Color(this);
c.setRGB(parseInt(whichColor, 16));

make another copy with just the stroke and put on the layer above. That way… your stroke will always be there.

I have 240 country shapes, so this will duplicate the size of the movie. ¿Do you have another idea?

just a thought…

do you think its possible if you simply create a basic shape image and simply use a mask to get the shape you want …

think if this is possible…it will save a lot of resources overhead…

and you could simply paint the individual instance with actionscript…and retaining the stroke that is the mask…

hope it helps…no sure whether this is workable or not…:-\

it will not duplicate size of the movie if you just use the pen tool to “trace” the stroke of your original movie.