I have an old Flash game where I used interpolateColor to blend colours extensively and it worked.
But it's giving an error now. Here is the code:
var firstColour = firstFusionGenes.girl.body.head.shapes.transform.colorTransform.color;
var secondColour = secondFusionGenes.girl.body.head.shapes.transform.colorTransform.color;
var newColour = this.transform.colorTransform; //so it's not empty
newColour.color = Color.interpolateColor(firstColour, secondColour, 0.5);
I've traced the results of firstColour and secondColour and they come back as color integers as expected. But I get the error:
ReferenceError: Error #1065: Variable Color is not defined.
I've made sure to add all the lines about importing Color into Flash, although it used to work without that anyway. Something I did when reformatting it to app format has broken it. But I don't understand the error; it's like it doesn't understand what "Color" is now? What does the error mean?
Addendum:
I made a fresh new file testing out the code and it gives a different error:
1120: Access of undefined property Color.
But this error goes away when I include this in the file:
import fl.motion.Color;
So I don't think it's an issue of Color not being in the program. The error from that is slightly different.