I am trying to take a movieclip of a character and change the colour of their clothes. The character is comprised of vectors.
So far I have semi-sucessfully used this method:
- stop the movieclip
- take the bitmap data from the current frame
- use threshold to replace the colour
- store the resulting bitmap data in an array
- add an onenterframe function - clear the current frame and add the bitmap data from the processed data in the array
So - this works pretty well. Each frame is only processed once at the beginning and then the write to the movieclip is very quick.
However! As the replacement is being performed on a bitmap there is an amount of aliasing that takes place to remove jaggies/pixelation. This produces colours that are not matched using threshold. So the main colour is replaced correctly but it is surrounded by a halo of mixed colours :(
I am sure there should be a better way to do this. Any ideas or answers would be greatly apreciated - Thanks.