Actionscript 3 无法在Mac OS上的空中应用程序中打开PDF文件。但同样的代码在windows中工作

Actionscript 3 无法在Mac OS上的空中应用程序中打开PDF文件。但同样的代码在windows中工作,actionscript-3,air,adobe,Actionscript 3,Air,Adobe,此代码不会在Mac OS上的AIR应用程序中打开PDF文件。但同样的代码在windows中工作。 我安装了AdobeAcrobatReader。但我仍然面临MAC操作系统的错误 受保护的功能按钮2\u clickHandler(事件:MouseeEvent):无效 尝试在Mac上安装Acrobat Reader { if (HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK){

此代码不会在Mac OS上的AIR应用程序中打开PDF文件。但同样的代码在windows中工作。 我安装了AdobeAcrobatReader。但我仍然面临MAC操作系统的错误

受保护的功能按钮2\u clickHandler(事件:MouseeEvent):无效


尝试在Mac上安装Acrobat Reader

        {





            if (HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK){



            var FileDir:File =new  File();

            var FilePath:String = "";               



            try

            {

                // Open browser for choose pdf file for open

                FileDir.browseForOpen("Open As [Only supports .PDF extension with file name.]");



                FileDir.addEventListener(Event.SELECT, readFromDirectory);

                //htmlLoader.parent.removeChild(htmlLoader);

            }

            catch (error:Error)

            {

                trace("Failed:", error.message);

            }



            //***** Browse event complete *****

            function readFromDirectory(event:Event):void

            {   

                try

                {           

                    var newFile:File = event.target as File;

                    FilePath =  newFile.nativePath;



                    var url:URLRequest = new URLRequest(FilePath); //URL to the file                      



                    htmlLoader.width = 700; //width of the content area



                    htmlLoader.height = 450; //height of the content area



                    htmlLoader.load(url);



                    //wrapping into UIComponent                   



                    holder = new UIComponent();                       

                    holder.addChild(htmlLoader);

                    addElement(holder);              



                }

                catch(err:Error)

                {

                    trace("file not in correct format");

                }

            }   

            }               

        }