ByteArray.readUTFBytes()

Actionscript:
  1. var m:ByteArray = new ByteArray();
  2. var bytes:Array = [0x41, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20,
  3.                    0x53, 0x6E, 0x69, 0x70, 0x70, 0x65, 0x74]
  4. for (var i:int = 0; i <bytes.length; i++){
  5.     m.writeByte(bytes[i]);
  6. }
  7.  
  8. m.position = 0;
  9.  
  10. trace(m.readUTFBytes(bytes.length));

I was messing around with a hex editor today and decided to start playing with ByteArray for the first time in awhile. Just wrote this as a little warm up... Try running it to see what it traces out...

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Posted October 18, 2009 at 6:11 pm | Permalink

    Kind of sounds like “try typing rm -fr /”, but I trust Flash not to do anything too bad to me (maybe I shouldn’t given your Project Time-bomb). Anyhow, I get “Action Snippet”. Pretty cool.

  2. Posted October 18, 2009 at 8:39 pm | Permalink

    yeah you could potentially do some funny stuff with this in conjunction with fileReference… like write a .app or .exe file and give it a name that will make the user curious enough to open it… heh…. but yeah, this just traces out Action Snippet…

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*