actionscript 3.0 and sockets.
While doing scheduling i learnt a lot about what not to do. Looking at it now, i feel that scheduler had been a victim of premature optimization. I wanted to make it really fast and went all out to do just that. And tried optimizing everything rite from the begining, and ended up screwing the readability and maintainability of the code. As time passed changes started becoming difficult, and the optimizations that were done initially became pointless. I then realised that i should have done optimization after the basics were finished.
I then started working on client(again), the one which i had left unfinished. After looking at the stats provided in adobe site, we decided on flash player v8. This supports actionscript 2.0. Main reason for choosing flash was that it was truly platform independent(unlike java ;-) ), and it could open sockets. The class XMLSocket in actionscript 2.0 adds a null byte(/000) to the end of any string it sends via the socket. The server which was reading it did not understand, and treated this as end of XML stream, and used to throw back xml-not-well-formed-error. I was breaking my head for the reason why this error message was coming from server. Then finally after some investigation we found 2 things which made xmlsocket unusable for client,
1> it doesnt support xml v1.0.
2> it adds null byte(/000) to the end of the string.
finally dumped actionscript 2.0 and then did one test in actionscript 3.0 and it just worked without any problems(used Socket and not XMLSocket).
Tags |- sun | pvs
| actionscript
2 comments:
Action script platform independent....ok...JAVA!!!!!!!!too ...yaar
Hi,
nice advertising..
i have a problem in passing xml data froma actionscript to java..how to resolve the problem?
can you post a little example?
thanks
Post a Comment