PDA

View Full Version : Draw Bitmap instead of Export Bitmap


alistair27
11-05-2009, 03:52 PM
I'm new to AS3, but experienced in AS2. I'm using Sandy to animate some objects in 3D. What I currently do to images which are EXPORTED in the library, I want to do to some bitmaps that I create using the DRAW technique. But it wont work :-(

CODE FOR 'CREATED BITMAP' :
ActionScript Code:
var bData:BitmapData = new BitmapData(myObject.width,myObject.height);
bData.draw(mask5);
var myTrace:Bitmap = new Bitmap(bData);




If I "addChild(myTrace)" ... it shows a perfectly traced BITMAP of myObject. So I'm happy that works. But where is "myTrace" ??? Why can't the following line of code (in the AS file) find it ???

ActionScript Code:
var myMaterial:BitmapMaterial = new BitmapMaterial( new myTrace (1,1) );




Sandy doesn't seem to treat the 'created' bitmap the same as those that are exported from the library. Desperate for help. Big thanks!!!!