0

我正在使用 Adob​​e AIR 开发一个窗口应用程序。同样,我试图截取整个桌面的屏幕截图,但由于某些限制,Adobe AIR 无法单独完成。所以我搜索了很多,发现了 FluorineFx Aperture 框架。我安装了它并按照它的帮助链接的每条说明进行操作。我的代码是下一个

<?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"]

请帮助我。

4

0 回答 0