# Flash & Irc?

**URL:** https://forum.kirupa.com/t/flash-irc/132911
**Category:** Uncategorized
**Created:** [January 3, 2005, 5:08pm UTC](https://forum.kirupa.com/t/flash-irc/132911 "2005-01-03T17:08:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![geek](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@geek](https://forum.kirupa.com/u/geek)
#### Post date: [January 3, 2005, 5:08pm UTC](https://forum.kirupa.com/t/flash-irc/132911/1 "2005-01-03T17:08:32Z")

</div>

Hello,  
Today i had a crazy idea when i saw that flash has a socket class.  
I remembered my old geekBot in php so i decided to try and make that in Flash. It didn’t work :(. Here’s the code:

```php

  IrcSocket = new XMLSocket();
  IrcSocket.onConnect = function(success){
  	if(success){
  		trace("Connection Successfull");
  		IrcSocket.send("NICK GeekTest
");
  		IrcSocket.send("USER GeekTest \"\" \"\" :GeekTest
");
  		IrcSocket.send("JOIN #banana
");
  	}else{
  		trace("Connection Failed");
  	}
  }
  IrcSocket.onClose = function(){
  	trace("Disconnected");
  }
  IrcSocket.onData = function(data){
  	trace(data);
  }
  IrcSocket.connect("64.246.0.150", 6667);
  

```

It traces Connection Successfull and then Disconnected. Any idea’s?
