# Connection Through Flash Questions

**URL:** <https://forum.kirupa.com/t/connection-through-flash-questions/225832>\
**Category:** programming\
**Created:** [May 16, 2007, 3:19am UTC](https://forum.kirupa.com/t/connection-through-flash-questions/225832 "2007-05-16T03:19:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LordArkain](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@LordArkain](https://forum.kirupa.com/u/LordArkain)\
**Post date:** [May 16, 2007, 3:19am UTC](https://forum.kirupa.com/t/connection-through-flash-questions/225832/1 "2007-05-16T03:19:30Z")

</div>

I guess this is where this would go. I’m kinda new to connecting to a server or whatever through flash and I was trying to follow some tutorials in a book I have but I have been unsuccessful so far. So I was wondering if anyone would mind giving me a hand on understanding what is needed to get this working and what not.  
So I have a webpage thats hosted by yahoo geocities (pro account) and this is what I had for a code in my flash.

```auto

_root.ConnectionBox = "";
var xsConnection:XMLSocket = new XMLSocket();
var bConnected:Boolean = xsConnection.connect("myURL",4444);
xsConnection.onConnect = function(bSuccess:Boolean):Void{
 if(bSuccess){
  _root.ConnectionBox = "....connected!";
  _root.play();
 }else{
  _root.ConnectionBox = "....could not connect.";
  _root.play();
 }
}

```

So anyways, I read that certain ports could not be used, but any port at a certain point and up would work. So I could just choose a random port and I would be all set. Sadly, I think the book is leaving out alot and assuming too much. Would I have to have something specific installed to get this to work on my geocities account? (Maybe they don’t support this kind of stuff.) Am I doing it all wrong? All I wanted to do was try and make a chatroom in flash.
