• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Create FTP connect and upload file is fine in AIR but fail in SWF?

New Here ,
Oct 22, 2014 Oct 22, 2014

Copy link to clipboard

Copied

I was have a project. It need to use FTP to upload files. And it works fine when I export to AIR.

Now.....I want to use it on web. So I export to SWF then....eternal error....

Below is my code

Thanks for your patience

private function connect():void{

            ftpSocket = new Socket();

           

            ftpSocket.addEventListener(ProgressEvent.SOCKET_DATA, SocketData);

            ftpSocket.addEventListener(IOErrorEvent.IO_ERROR, IOError);

            ftpSocket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, SecError);

            ftpSocket.addEventListener(Event.CONNECT, SocketConn);

            ftpSocket.addEventListener(Event.CLOSE, SocketClose);

            ftpSocket.addEventListener(Event.ACTIVATE, SocketAtivate);

           

            ftpSocket.connect(server,21);

           

            sendCommand("USER "+this.user);

        }

Error Message like this

*** Security Sandbox Violation ***

連線至 xx.x.xxx.x:21 已終止 - http://test.com.tw/test.swf?ts=1413962614971不允許

錯誤: 拒絕 xmlsocket://xx.x.xxx.x:21 的資源請求   由於沒有原則檔權限

Views

201

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines