[flexcoders] Re: Err - seems simple but.... convert from a String to a ByteArray?

2006-07-05 Thread bhaq1972
try something like this var byteArr:ByteArray = new ByteArray(); byteArr.writeUTF(hello); trace(byteArr.length); byteArr.position = 0; trace(byteArr.readUTF()); (something i tried in beta2...so who knows) --- In flexcoders@yahoogroups.com, davidgolds [EMAIL PROTECTED] wrote: How can I

[flexcoders] Re: Err - seems simple but.... convert from a String to a ByteArray?

2006-07-05 Thread drome.dario
var str:String = Hi David Golds; var bin:ByteArray = new ByteArray(); bin.writeUTFBytes( str ); Hope it helps Regards. --- In flexcoders@yahoogroups.com, davidgolds [EMAIL PROTECTED] wrote: How can I convert from a String to a ByteArray? ByteArray to String was easy