A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: capture user screen / print screen in as3

  1. #1
    Flash Genie letschillout's Avatar
    Join Date
    Feb 2007
    Location
    31.52949, 74.347272
    Posts
    146

    Thumbs up capture user screen / print screen in as3

    Hi,

    i want to user print screen command in AS3 and convert into bitmap as background in fullscreen i.e.

    print screen from keyboard - keycode i.e. 44
    http://thetutorials.wordpress.com/20...-the-keycodes/

    i want to know how can i run printscreen code from flash to capture user screen
    as i want to have flash presentation in 600x600px with disabled desktop and flash presentation should be in center of screen.

    any bright ideas?
    import flash.system.fscommand;

    stage.showDefaultContextMenu = false;
    stage.scaleMode = StageScaleMode.NO_SCALE;

    fscommand("fullscreen", "true");



    var bd:BitmapData = new BitmapData(stage.width,stage.height);
    bd.draw(stage);
    var screenshot:Bitmap = new Bitmap(bd);
    screenshot.x = 10;
    screenshot.y = 10;
    addChild(screenshot);
    Charag - 3D, Flash Games, Animations,
    Website Development & More...


  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    You can use BitmapData.draw() to capture everything on the stage but that's limited to what's inside the flash window. Taking a screenshot outside the flash window is restricted for security reasons.
    Please use [php] or [code] tags, and mark your threads resolved 8)

  3. #3
    Flash Genie letschillout's Avatar
    Join Date
    Feb 2007
    Location
    31.52949, 74.347272
    Posts
    146
    yeh i want screen shot out of flash, can run command printscreen to capture image and paste in movieclip? possible?
    Charag - 3D, Flash Games, Animations,
    Website Development & More...


  4. #4
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Not possible.
    Please use [php] or [code] tags, and mark your threads resolved 8)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center