Say I loaded a bitMap into a bitmapData type called tileImage.
tileImage = Bitmap(loader.content).bitmapData;
say I decided to add that bitmap into a sprite like below
this.graphics.beginBitmapFill(tileImage );
this.graphics.drawRect(0, 0,tWidth ,tHeight );
It would of course work. But say If I decided to add tileImage into a another bitMapData type like below
var tImage:BitmapData = new BitmapData(30,30);
tImage.copyPixels(tileImage,tRect,tPoint);
and I then added tImage to my sprite
this.graphics.beginBitmapFill(tImage);
this.graphics.drawRect(0, 0,tWidth ,tHeight );
I then get the following error
ArgumentError: Error #2015: Invalid BitmapData.
tRect and tPoint are all predefined and set. tRect x and y are 0,0 and the width and height are 30x30. tPoint is 0,0 as well. Yes I understand that this is a very brief explanation but I wanted to elaborate that a bitMapdata type that has its data from the copypixel method does not work with beginBitmapFill. but a varible that gets its data straigt from the source, does. One works, and one doesnt, yet they are both the same data types. why is this ?