# A little Problem

**URL:** <https://forum.kirupa.com/t/a-little-problem/308206>\
**Category:** flash\
**Created:** [April 19, 2010, 4:39am UTC](https://forum.kirupa.com/t/a-little-problem/308206 "2010-04-19T04:39:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![experts585](https://avatars.discourse-cdn.com/v4/letter/e/ecae2f/32.png) [@experts585](https://forum.kirupa.com/u/experts585)\
**Post date:** [April 19, 2010, 4:39am UTC](https://forum.kirupa.com/t/a-little-problem/308206/1 "2010-04-19T04:39:05Z")

</div>

Hi to All  
i have a little problem  
i have a task.  
how code i know the right place of code to be paste  
i have a game pong  
and i am tryng to insert xmlsocket code but when i insert the code its give error  
“the class or interface ‘dataevent’ cannot be loded”  
waht is the problem i konw that i did’t insert code the right place but what to doo any one plz

onClipEvent (load){  
this.paddleSpeed = 5;  
this.\_x = 210;  
this.\_y = 470;  
}  
onClipEvent (enterFrame) {  
var xmlSocket:XMLSocket = new XMLSocket();  
xmlSocket.connect(“127.0.0.1”, 9090);

xmlSocket.addEventListener(DataEvent.DATA, onIncomingData);

function onIncomingData(event:DataEvent):void  
{  
var incomestring:String = event.data;  
var isArray:Array=new Array();  
isArray = incomestring.split("|");

```
//isArray[0];
//isArray[1];
//isArray[2];
//isArray[3];
//isArray[4];

//if(isArray[1] == "4" && isArray[0]=="0")
    //trace("Player4 joined:"+event.data);
//else if(isArray[1] == "2" && isArray[0]=="1") 
    //trace("Player4 moving:"+event.data);
//else if(isArray[1] == "2" && isArray[0]=="2") 
    //trace("Player4 left:"+event.data);
//else if(isArray[1] == "2" && isArray[0]=="3") 
    //trace("Player4 confusing:"+event.data);

    }

//_root.b1.isSelected = true;
if (Key.isDown(Key.LEFT) && this._x&gt;40) {
    this._x -= this.paddleSpeed;
}
if (Key.isDown(Key.RIGHT) && this._x&lt;356 && _root.b1.isSelected == false) {
    this._x += this.paddleSpeed;
}else if (Key.isDown(Key.RIGHT) && this._x&lt;337 && _root.b1.isSelected == true){
    this._x += this.paddleSpeed;
    }

```

}
