r135 - Bitmap & BitmapData support added

0 views
Skip to first unread message

Cédric Tabin

unread,
Feb 8, 2009, 7:09:57 PM2/8/09
to mas...@googlegroups.com
Hello,

I just uploaded the latest revision of masapi :) You have now the Bitmap & BitmapData support :

var cml:CompositeMassLoader = new CompositeMassLoader();
var picture:ILoadableFile = cml.add("aPic.png");

//...
var bmp:Bitmap = picture.getData(DataType.BITMAP);
var bmpData:BitmapData = picture.getData(DataType.BITMAP_DATA);

And this also works for swf files !

Regards,
Cedric

sitron

unread,
Feb 9, 2009, 12:36:24 PM2/9/09
to masapi

Hello Cedric!
maybe it's my mistake, but i get an error when trying to retrieve the
bitmap: sourceBitmap is null (in ULoadableFile.as)
it seems that the tmpLoader.loadBytes(loadedData); is asynchronous so
sourceBitmap is still null when you try to clone it.

once again, i might be wrong...
thanks for your help.

Cédric Tabin

unread,
Feb 10, 2009, 5:01:29 AM2/10/09
to mas...@googlegroups.com
Hello,

Yes thanks, I tested ans you're right... the Loader.loadBytes method is asynchronous :( For the moment, I juste removed it from ULoadableFile and change the FileTypeSelector, so that the png, jpg and gif files are loaded as SWF files (this make more sense instead of BINARY).

Regards,
Cedric
Reply all
Reply to author
Forward
0 new messages