Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8567849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:58:29+00:00 2026-06-11T17:58:29+00:00

I am working on a project, where I have to make an annotation video

  • 0

I am working on a project, where I have to make an annotation video player!

Basically, I followed this tutorial[1] where the author presents how to draw(in this case just a rectangle) on the own web camera, using Flex.

Everything went great, but now I want to add a listener to get a snapshot of the image(what I draw + the web camera image) and then save it on my computer.

I have created the listener, but the problem is that this listener saves only the image from the web camera without my drawing(even though I added that draw to the camera).

private function save():void {

    var bitmapData:BitmapData = new BitmapData(videoDisplay.width,videoDisplay.height);
    bitmapData.draw(videoDisplay);

    var ba:ByteArray = (new PNGEncoder()).encode(bitmapData);
    (new FileReference()).save(ba, "doodle.png");       
}

I don’t have experience at all with Flex/Flash so maybe I did smth wrong.

Can you please help me?

[1]http://narinderkumar.wordpress.com/2012/02/16/drawing-on-live-video-in-flex/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:58:31+00:00Added an answer on June 11, 2026 at 5:58 pm

    this example works fine – i dont see the problem in that codesnippet of yours but maybe you are just drawing vis graphics on the video, in thatcase the graphics layer is behind the camera… hope hat helps 😉

    package
    {
        import flash.display.Bitmap;
        import flash.display.BitmapData;
        import flash.display.Sprite;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.media.Camera;
        import flash.media.Video;
    
        public class cameratest extends Sprite
        {
            private var holder:Sprite;
            private var layover:Sprite;
            private var display:Sprite;
    
            public function cameratest()
            {
                stage.scaleMode = StageScaleMode.NO_SCALE;
                stage.align     = StageAlign.TOP_LEFT;
    
                var cam:Camera = Camera.getCamera();
                var video:Video     =new Video(cam.width, cam.height);
                video.attachCamera(cam);
    
                        //holder hollds the video and on top the layover to draw on
                holder = new Sprite();
                stage.addChild(holder);
                holder.addChild(video);
    
                //layover to draw on                
                layover = new Sprite();
                holder.addChild(layover);
    
                //will show the snapshot
                display = new Sprite();
                display.x= 350;
                stage.addChild(display);
    
                //listener for onclick do snapshot
                stage.addEventListener(MouseEvent.CLICK, drawAndSave);
            }
            private function drawAndSave(E:Event=null):void{
                layover.graphics.beginFill(0xff0000,1);
                layover.graphics.drawCircle(10,10,10);
    
                var bmd:BitmapData=new BitmapData(holder.width,holder.height);
                bmd.draw(holder);
    
                var bmp:Bitmap = new Bitmap(bmd,'auto',true);
                display.addChild(bmp);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on project, to make a website which read files(c/c++ text
I have to make a large amount of forms for a project I'm working
I'm working on a project where I have to make a binary search tree
Ok I am working on a project for my class. I have to make
I have a JSF project working with JPA, I do this : retrive some
I working on project and have problem with threading and update of UI. I
I have a working project that Im amending, it crashes after trying to use
I have a project working fine under MSVS 2010 SP1. I'm trying to convert
I am working on project where I have the checkInternet method in one of
I’m working on a project and have developed the high level user requirements for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.