Cengiz Can

Technically possible

How easy to take screenshot of videos with Actionscript

without comments

Just create a BitmapData instance and call draw function of that instance with a DisplayObject type parameter. Here i’ve used

package com.cengizcan.graphics
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;

import mx.controls.VideoDisplay;

public class ScreenShot
{
public static function CaptureScreen(vid:VideoDisplay):Bitmap
{
var bmpData:BitmapData = new BitmapData(320, 240);
bmpData.draw(vid);
return new Bitmap(bmpData);
}
}
}

Written by cengiz

January 3rd, 2010 at 10:44 pm

Posted in Flash Platform

Tagged with , ,