PDA

View Full Version : need AS 2 to AS 3 help, thanks ;D


hang_design
01-17-2008, 10:34 PM
well, i am a very beginner of flash. i just started to learn it with AS3. can someone plz help me to tanslate it? thx a lot.. (maybe u could also teach me why u translate it in this way. thx)


Host = "localhost";


Port = 5331;


socket = new XMLSocket();


this.onLoad = function() {
_root.socket.connect(_root.Host,_root.Port);
};


XMLSocket.prototype.onData = function(src) {
MoveIt(src);
};


function MoveIt(myString) {

myString = myString.substring(0, myString.length-1);

_root.pictureMC._x = (myString*2)-600;

trace(myString);
}