Hi!
I would like to make some kind of thumbnail with capturing BitmapData
or ImageSnapshot
of some UNINITIALIZED components in my Flex application.
Is it possible?
Thanks in advance!
m.
Hi!
I would like to make some kind of thumbnail with capturing BitmapData
or ImageSnapshot
of some UNINITIALIZED components in my Flex application.
Is it possible?
Thanks in advance!
m.
No. I believe you will end up getting null references if the components are not initialized (The graphics and stuff will all be uninitialized). You can simply initialize the components but make them hidden and take a thumbnail.
@CookieOfFortune
Thanks for help man =)
I tried to make something like this in my main application
private function createThumbs():void{
thumbsData = new ArrayCollection();
tempHolder.addChild(_32);
var bm:BitmapData = getBitmapData(tempHolder);
var img:Image = new Image();
img.source = new Bitmap(bm);
thumbsData.addItem(img);
tempHolder.visible = false;
testImg.source = new Bitmap(bm);
}
_32 is my component which I would like to take thumbnail. tempHolder
is Canvas
, testImg
is Image
class.
tempHolder
displays what I want to capture, while testImg
in my case is always white...
I don't understand it =)
Thanks one more time ;-)
@Jasconius I used the technique you describe for creating thumbnails of imported stuff into an AIR app and it's a drag to build all the routines, but in the end I'm satisfied with this solution. I use it for creating thumbnails from images, video and modules (with each a different container and routines to load and unload the footage)
The good part of this is that when you are building your thumbnailcreatorComponent - you can position it in the viewarea of the app to see what's going on. Later, when you are sure that everything works fine, you can put the thumbnailCreator at -10000,-10000 and forget about it.