Capture Video Frame To BitmapData (Extra - Add Bitmap to PV3D Material)


/ Published in: ActionScript 3
Save to your folder(s)

Easy little script to grab the current frame's BitmapData from a Video()


Copy this code and paste it in your HTML
  1. // Grab the Frame from the Video()
  2. _vidBitmapHolder = new BitmapData(_screenWidth, _screenHeight, false, 0x000000);
  3. _vidBitmapHolder.draw(videoFile); // draw the Video() Object
  4.  
  5. // Extra - Turn it into a BitmapMaterial for Papervision3D
  6. _tempVideoScreen = new BitmapMaterial(_vidBitmapHolder, false); // Create the BitmapMaterial

URL: http://www.destroyyourcomputer.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.