在Adobe Air中使用FluorineFx Aperture拍摄Windows桌面的screenShot

时间:2013-10-29 12:25:12

标签: actionscript-3 flex air flex4 fluorinefx

我正在使用Adobe AIR处理窗口应用程序。为了相同我试图截取整个桌面,但由于一些限制Adobe AIR不能单独做。所以我google了很多,发现有关FluorineFx Aperture framework.i安装它并按照它的帮助链接的每个指令。 我的代码是下一个

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx" 
                       xmlns:aperture="com.fluorinefx.aperture.*">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->

        <aperture:LocalObject id="lc" showBusyCursor="true" source="apimaging : FA214032-E7C4-4627-80FF-B3E1B7318A49" fault="onFault(event)">
            <aperture:methods>
                <aperture:method name="CaptureDesktopClip" result="onCaptureClip(event)" fault="onFault(event)"/>
            </aperture:methods> 
        </aperture:LocalObject>
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            import mx.controls.Image;
            import mx.rpc.events.FaultEvent;
            import mx.rpc.events.ResultEvent;

            public function onFault( event:FaultEvent ):void
            {
                trace( "Fault:" + event.fault);
            }

            public function capture():void
            {           
                lc.CaptureDesktopClip();            
            }
            private function onCaptureClip( event:ResultEvent ):void
            {
                trace("onCaptureClip");

                var data:BitmapData = Clipboard.generalClipboard.getData(ClipboardFormats.BITMAP_FORMAT) as BitmapData;
                var bitmap: Bitmap = new Bitmap(data);
                var img:Image = new Image();

                img.addChild(bitmap);
                trace("images information/'''''''''"+img);
                back.addElement(img);
            }
        ]]>
    </fx:Script>
    <s:VGroup id="back" height="100%" width="100%">
        <s:Button label="capture" click="capture()"/>
    </s:VGroup>
</s:WindowedApplication>

在我调用capture()函数时调试所有必需的 .dll文件后,获取以下错误

[RPC Fault faultString="Error loading library apimaging " faultCode="Aperture.Error.LoadLibrary" faultDetail="Could not find the key in the registry"]

请帮助我。

0 个答案:

没有答案