Some imports I used:
import flash.display.BitmapData;
import flash.geom.Matrix;
import flash.geom.Rectangle;
import flash.geom.ColorTransform;
import starling.display.Sprite;
import starling.display.MovieClip;
I have here a BitmapData:
var bm_data:BitmapData = new BitmapData(rec.width, rec.height, false, 0); //rec is a rectangle
I got the transformation Matrixes:
var sprite_1_M:Matrix = sprite_1.transformationMatrix; //these are objs that extends starling.display.Sprite
var sprite_2_M:Matrix = sprite_2.transformationMatrix;
And here is the problem:
bm_data.draw(sprite_1.movie_clip, sprite_1_M, new ColorTransform(1,1,1,1,255,-255,-255), BlendMode.ADD);
bm_data.draw(sprite_2.movie_clip, sprite_2_M, new ColorTransform(1,1,1,1,-255,255,-255), BlendMode.ADD);
Error:
Implicit coercion of a value of type MovieClip to an unrelated type IBitmapDrawable
Any hints what should I do? A think flash movie clips would work...