Actionscript 3.0 内的屏幕转储是否可能?
我们现在有 Bitmap 和 Bitmapdata 对象。当使用网络摄像头时,我们可以从中获取原始像素数据输出。但是,我们能否以某种方式从“stage”或“swf”对象获取原始像素数据?
我想用它来制作 Actionscript 应用程序某些部分的“小缩略图”,这些缩略图可能是同时由动态文本、位图图形和影片剪辑组成的复杂组合。所以最好进行“快速快照”并将当前组合像素放入一个位图中,然后能够“保存以供以后使用”。
这可能吗?是不是太容易了?我只是在 Adobe Docs 中查找了错误的位置吗?
舞台上同时有图像、矢量等,所以我需要获取“舞台”对象位图数据???
We have Bitmap and Bitmapdata objects now. And when using the webcam, we can get raw-pixeldata output from it. But, can we get raw-pixeldata from the "stage" or "swf" object somehow?
I would like to use this to make "small thumbnails" of certain parts of Actionscript applications and these could be complex compositions of dynamic text, bitmap graphics and movieclips at the same time. So it would be nice to make a "quick snap" and just get the current combined pixels into one bitmap and then be able to "save that for later use".
Is that possible? is it too easy? am I just looking the wrong place in the Adobe Docs?
We have images, vectors etc at the same time on stage, so I need to grab the "stage" objects bitmapdata???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建一个
BitmapData
并调用其draw()
方法与相应的DisplayObject
如果你想让缩略图更小,创建一个
Matrix
并调用它具有所需缩放参数的createBox
方法,并将其传递给draw
方法。Create a
BitmapData
and call itsdraw()
method with the correspondingDisplayObject
If you want to make thumbnails smaller, create a
Matrix
and call itscreateBox
method with required scaling parameters and pass it to thedraw
method.