Forums

ForumsProgramming Forum

Sending information back and forth thru a GoDaddy server? (as2)

Posted Sep 22, '13 at 3:38pm

mightybob

mightybob

351 posts

How could I send information, like x and y positions to a GoDaddy server, and also retrieve that information from another Flash Player in As2?

 

Posted Sep 22, '13 at 8:20pm

weirdlike

weirdlike

476 posts

Knight

HERE is a tut on peer to peer connections.

Maybe it will work for you just to get started

 

Posted Sep 23, '13 at 8:50am

mightybob

mightybob

351 posts

Thanks for the reply I'll look at the tutorial!

 

Posted Sep 23, '13 at 8:53am

mightybob

mightybob

351 posts

Ok sorry but looking at it I see I need to know a server port and a server name (I think?)... Any idea how I could figure this out? (I already have an up and running server)

 

Posted Sep 23, '13 at 9:06am

mightybob

mightybob

351 posts

Sorry, triple post, but another question:

Is this code meant to connect to local server or a online one?

Plus it looks like it's as simple as saying "server.send(variable)", once it's all setup. So does this mean I could set a variable as a X and a Y position every frame, and then send that to the server every frame, and then also retrieve that info every frame from another flash player? If all that is possible then this tutorial is exactly what I'm looking for. Right now the tutorial seems a little vague on what everything means.

Like this part:

msg=""
server.send(msg)

I'm guessing the "login Nickname" is my username? And domainName since my server is called http://www.bobmania.com, I'd put that there? And then pass is my password for my account on godaddy? Or some other type of password? And I'm assuming once I've sent the "msg", then I'm logged in to send / receive whatever info I want?

Also is this where your domain restriction thingy comes into play, to protect people from getting all that info?

Okay this part I also will need some clearing up on:

server.connect("localhost", 2727)

So of course It's not a local server, so I need some other name. ( web adress maybe? like http://www.bobmania.com )

And how do I know the port?

Thanks again!

 

Posted Sep 23, '13 at 10:32am

weirdlike

weirdlike

476 posts

Knight

The tutorial is just to get you to establish the connection nothing more.

"localhost" is connecting your computer to itself

server.connect(URL, port)

scanning for open ports windows

 

Posted Sep 23, '13 at 12:48pm

mightybob

mightybob

351 posts

Ahh ok. So all I need is a port, a URL, and of course the server password username. Then the code just does the rest. Well, any ideas of how I could send information to it? Like variables? I've been googling for a while but can't find anything.

 

Posted Sep 23, '13 at 1:20pm

weirdlike

weirdlike

476 posts

Knight

once you have made the connection you can send data via

msg="what ever you want"
server.send(msg);

 

Posted Sep 23, '13 at 1:50pm

mightybob

mightybob

351 posts

Well looked it up apparently this will eat up all my bandwidth, so I posted on the support forum, maybe there's an armorgames server they let people use.

If not maybe I could get a separate server for the game, so bandwidth isn't eaten up. Because my site is already slow enough, any more would be ridiculous.

 

Posted Sep 23, '13 at 1:53pm

mightybob

mightybob

351 posts

Oh and anyone who is going to do this but needs an open port (mac) there's a pretty cool built in app called Network Utility, on the far right there's a port scan, takes a few mins but it works!

 
Reply to Sending information back and forth thru a GoDaddy server? (as2)

You must be logged in to post a reply!