Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11
    Join Date
    Apr 2010
    Location
    Newcastle
    Posts
    655
    Tokens
    50

    Default

    Just wondering if
    Code:
    num1,num2,num3 = 5;
    would be the equivalent of
    Code:
    num1=5;
    num2=5;
    num3=5;
    There are no compile errors, would it work?

  2. #12
    Join Date
    Nov 2008
    Location
    Cambridge, UK
    Posts
    901
    Tokens
    100

    Default

    If there are no compile errors it should be fine
    we're smiling but we're close to tears, even after all these years

  3. #13
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Just do the socket only part first to make sure that it will solve the problem.

    Quote Originally Posted by Apolva View Post
    OK I'm rewriting in AS3 now seems a much neater language lol.

    Just hope this will solve the problem.

  4. #14
    Join Date
    Apr 2010
    Location
    Newcastle
    Posts
    655
    Tokens
    50

    Default

    Still no luck

    Here's what I have so far, having rewritten some of it in AS3 (this is just the connection.as include - someone please tell me if I'm doing someting wrong )

    Have tried adding crossdomain.xml to the root of the domain, also tried with/without the final null character in the policy response.

    Instead of going to the policyfile log, it pops up in an error window now.
    Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://blah blah blah/VirtualRoom.swf cannot load data from 192.168.1.86:4049.
    at VirtualRoom_fla::MainTimeline/frame3()
    Extract of Java server code (which responds to policy request)


    The connection.as
    Last edited by Apolva; 08-06-2010 at 08:51 PM.

  5. #15
    Join Date
    Nov 2008
    Location
    Cambridge, UK
    Posts
    901
    Tokens
    100

    Default

    I dunno what to say dude, I haven't crossed this bridge yet. You've probs checked this stuff, but here's some late night reading for you
    http://livedocs.adobe.com/flex/2/doc...=00001950.html
    http://www.adobe.com/devnet/flashpla...in_policy.html
    http://www.adobe.com/devnet/articles...file_spec.html

    Please, please, please let us know if you find a solution, will help me greatly!
    we're smiling but we're close to tears, even after all these years

  6. #16
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    The first call to order is make sure the JAVA server is doing what it is meant to do.

    Make a simple java client and see if it can successfully pull the policy file from the java server. Once you have done that, you know you can focus on the flash side of things.

    I haven't read all that you have posted, will take a deeper look not to see if anything stands out.

    Edit: Just skimming over the policy you are outputting, I'm not sure if flash requires the the xml opening tag. ( <?xml version="1.0"?> )

    Edit2: And just another sort of obvious suggestion. In my personal usage I went for the direct route of serving the policy on port 843 (which is where flash checks first, then after a 3 second timeout moves on ) But that then is completely incorrect as you have already stated you are getting the request to give serve the policy.
    Last edited by Source; 09-06-2010 at 01:16 AM.

  7. #17
    Join Date
    Apr 2010
    Location
    Newcastle
    Posts
    655
    Tokens
    50

    Default

    Success!

    I found this: http://zappmonkey.com/journal/flash-policy-server/

    That did the trick, it seems they've changed it so that you can only serve it on port 843 now, rather than the port you're accessing (at least that's what I've found).

    +Rep both for the suggestions

  8. #18
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Still makes no sense as to why Flash was requesting the policy from the port you already had a connection to.

  9. #19
    Join Date
    Apr 2010
    Location
    Newcastle
    Posts
    655
    Tokens
    50

    Default

    Quote Originally Posted by Source View Post
    Still makes no sense as to why Flash was requesting the policy from the port you already had a connection to.
    I know, it even requested it without the
    Code:
    Security.loadPolicyFile("xmlsocket://" + serverHost + ":" + serverPort);
    Extra note - because *nix machines protect ports 1024 and below, I had to run the server as root (with sudo)

  10. #20
    Join Date
    Jul 2008
    Location
    Leeds, UK
    Posts
    47
    Tokens
    0

    Default

    My server (C#) handles both the Policy and Server of the program. Whenever a client connects it sends out the Policy whether they want it or not and it seems to work just fine.

    Also,
    Code:
    line.equals("<policy-file-request/>")
    didn't work because of white space which is on the end of the string.

    I use this function
    Code:
    private string removeWhite(string msg)
            {
                string ret = "";
                int z = msg.Length;
                for (int i = 0; i < z; i++)
                {
                    int c = msg.Substring(i, 1).ToCharArray()[0];
                    if (c != 0)
                    {
                        ret += msg.Substring(i, 1);
                    } else {
                        return ret;
                    }
                }
                return ret;
            }
    to remove the white space and return just the part of the string which we want.

    or instead you could use

    if(line.startsWith("<policy-file-request/>") == true) {

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •