Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 295385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:27:12+00:00 2026-05-12T06:27:12+00:00

I have a Flash client that I want to connect to a server. Both

  • 0

I have a Flash client that I want to connect to a server. Both are using localhost and port 50000 so there shouldn’t be any cross-domain problems. I also set Access Network Only in the publishing settings. When I call the XMLSocket connect, the server seems to get a new connection. But, the XMLSocket.onConnect callback is not called with success=true.

Any ideas on what may be wrong?

Here’s the ActionScript for creating the socket.

 function myOnConnect(success) {
    if (success) {
        trace ("Connection succeeded!")
        inputText.text = "open";
//      socket.send("1\n");
        gotoAndPlay(2);
    } else {
        trace ("Connection failed!")
        inputText.text = "failed";
    }
}


btnConnect.onRelease = function()
{
    inputText.text = "started";


    result = socket.connect("localhost", 50000);


}

socket = new XMLSocket();
socket.onConnect = myOnConnect;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:27:13+00:00Added an answer on May 12, 2026 at 6:27 am

    This ended up being a security problem. The Flash Player has added security when a XMLSocket is used. The Flash Player now looks for a policy file on port 843. An alternative is to have the swf look for the policy file using the call Security.loadPolicyFile(). If the file exists and all the security settings permit the XMLSocket, then the connection is created.

    Check out the Adobe article on Policy files and more info here. This is another good article about policy files.

    Here is the policy file that finally worked for me. It is not restrictive at all. But, I figured I get things working and then make them right.

    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
    
    <!-- Policy file for xmlsocket://socks.example.com -->
    <cross-domain-policy> 
    
       <!-- This is a master socket policy file -->
       <!-- No other socket policies on the host will be permitted -->
    <!--   <site-control permitted-cross-domain-policies="all"/> -->
    
       <!-- Instead of setting to-ports="*", administrator's can use ranges and commas -->
       <!-- This will allow access to ports 123, 456, 457 and 458 -->
       <allow-access-from domain="*" to-ports="*" secure="false"/>
    
    </cross-domain-policy>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a flash program that loads movie clips dynamically and sometimes they want
I have developed a Flash based chat client that displays messages posted by users
I have Java and Flash client applications. What is the best way for the
I have created a pretty basic Flash website for a client and am having
I have a flash player that has a set of songs loaded via an
I have a Flash application that is hosted from within a Drupal page. Some
I have a flash movie that loads images dynamically from an xml file. I
I have a Flash sprite in my Director project. Under the Properties of that
Let's say that I have a Flash website where you could create an avatar
I've seen a few sites that have a flash app which takes video from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.