This content has been marked as final. Show 3 replies
You can use...
vImage = member("3D").image
... assuming that your shockwave3D member is called "3D".
You can use the crop() method on an image to return a cropped rect of that image. Or you can position your model in the 3D sprite before you take the snapshot, so that it fills the sprite.
As far as i know, only the default camera of a 3D-member will produce the "member("3D").image". But you can set the size of the image with the "defaultrect" property of the 3D-member. The 3D-member does not have to be on stage.
If you would like to get a image that has the size of 1024x1024 you would set the "defaultrect" of the 3D-member first.
member("3D").regpoint=point(512,512) -- just to keep the center in the middle, would make sense to use variables here...
or the faster way would be to create in the beginning a image and then use copypixels.
... -- later on in the script where you want to copy the image of the 3D member into your bitmap...
pImage.copyPixels(pmember.image, pimage.rect, pmember.rect)
to generate the alpha-channel, i think you would have to use two images, one with a white backround and a black model. You only need to apply a black shader to your model (and all its children) and make the screenshot. Then use some imaging lingo to add the alpha channel to the colored version.
Nice work both of you. Both worked fine and hondo3000, the alpha idea is just what i needed.