Flex - Copying a Single frame from a Video
I'm working with video in Flex开发者_开发问答. I'd like to be able to pause the video at a certain point and copy the displayed frame as an image, and save it to a database. I'm wondering if anybody knows how I might copy a single frame from a paused video? Thanks --Matt
Assuming your video is called 'clip'
var frameGrab:BitmapData = new BitmapData( clip.width, clip.height, false, 0x000000);
frameGrab.draw(clip); // < the .draw() method will copy the frame from your video.
// Add to the stage...
var frame:Bitmap = new Bitmap(frameGrab);
addChild(frame);
精彩评论