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!


Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default Basic Flash Game Tutorial.

    For this I will be using flash 8. I'm assuming you have some knowledge of flash. This is not a copy and paste and get a fully working game kinda of tutorial...

    First you will need a server to connect too.
    Palabre
    XML Socket Python Server
    Freehttp://palabre.gavroche.net

    Mostrey
    Flash / Python Socket Server
    Free
    http://mostrey.be

    Flash Now
    Flash Socket Server
    Free (5 User) $495 (Unlimited)
    http://www.nowcentral.com

    Electro Server
    Flash/Lingo Socket Server
    Free (25 Users) $700 - $4400 (500- 200 000 Users)
    http://www.electro-server.com

    Smartfox
    Flash Socket Server
    Free (20 Users) $500 - $2000 (100-Unlimited)
    http://www.smartfoxserver.com

    Oregano
    Flash Socket Server
    Free

    http://www.spicefactory.org/oregano/

    Any of those servers will work nicely.

    **Warning Each Servers Connection and Reply Codes Is Different. This is only a basic idea**


    First you need to give the frame some actionscript so it can connect to the server.
    To do that you would use something like this:
    Code:
    mySocket = new XMLSocket()
    mySocket.connect("ip", port)
    stop();
    
    mySocket.onConnect = function(success)
    {
      if (success) 
         gotoandstop("Scene 1", 2)
    
      }
    Next you would need a login for your user's to login to your game obviously.
    You need 2 fields. Call 1 username and the other password. Then you need a button for submit..

    The the submit button would have a code to send to the server//
    Code:
    on (Press) {
        mySocket.send("setname " + username + " " + password + " 0 0")
    }
    The server will reply with a code saying if it's valid or not and if the user has special privalages or not.

    You need to tell the client what to do if the user is valid.
    You would use something like this:
    Code:
     
        if (packets[0] == "auth_ok") {
             gotoandstop("Scene 1", 3) 
        }
    This just goes to the frame with your chat in it if the user exists.

    Next you will need a chat bar..
    Make 1 input text field and another submit button.
    set the var of the input text field as chat.

    Then to send the chat to the server so everyone can see it. You would do something like this:
    Code:
    on (press) {
            mySocket.send("speak " + chat)
            chat = ""
    }
    I'll add more later I'm have to work soon. Maybe I'll add pictures too if people want.
    Last edited by Colin-Roberts; 14-07-2008 at 06:19 PM.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


Posting Permissions

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