• printscreen com adobe air

    como capturar a tela com adobe air? esta é uma pergunta que tive a muito tempo, depois de algumas pesquisas, achei uma classe que ajuda-me a capturar a tela do meu pc. uso ela para fazer tutorias, dos backoffice que usamos na empresa, e tambêm para capturar telas dos clientes pra facilitar o diagnótico dos problemas em causa. vou posta o exemplo que achei. O codigo é simples e depois é você fazer as alterações diacordo com a sua necessidade.

    A classe:
    as3classes.zip

     

    [code lang="actionscript3"]<?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    title="Print Screen Monitor sample application." initialize="init();"
    showStatusBar="false">

    <mx:Script>
    <![CDATA[
    import couk.psyked.air.printscreen.events.PrintScreenMonitorEvent;
    import couk.psyked.air.printscreen.PrintScreenMonitor;

    private var monitor:PrintScreenMonitor

    private function init():void {
    monitor = new PrintScreenMonitor(100);
    monitor.addEventListener(PrintScreenMonitorEvent.ADD_SCREENSHOT, updateImage);
    monitor.addEventListener(PrintScreenMonitorEvent.CHANGE_SCREENSHOT, updateImage);
    monitor.addEventListener(PrintScreenMonitorEvent.REMOVE_SCREENSHOT, removeImage);
    monitor.watch();
    }

    private function updateImage(e:PrintScreenMonitorEvent):void {
    image.data = e.bitmap;
    }

    private function removeImage(e:PrintScreenMonitorEvent):void {
    image.data = "";
    }
    ]]>
    </mx:Script>

    <mx:Label x="10" y="10" text="When you press the print screen, the screenshot will be displayed below."/>
    <mx:Image left="10" right="10" top="36" bottom="10" id="image" verticalAlign="middle" horizontalAlign="center"/>
    </mx:WindowedApplication>
    [/code]

    Gostou estao deixa um comentario, sugestão, critica, o quer alguma dica.
    Retweet this post

    Related posts:

    1. Print Screen em AIR Bom a alguns meses estava estudando e queria tentar capturar...
    2. Básico Flash preloader Este tutorial mostra como criar um preloader em flash com...
    3. Adobe Wave A Adobe lançou sua nova ferramenta, Adobe Wave, feita com...
    4. Adobe LiveCycle Tour A Adobe anunciou mais uma suíte de aplicativos. Esta suíte...

    Related posts brought to you by Yet Another Related Posts Plugin.

    Tags:, , , ,

Leave a comment