Thanks to everyone who attended my ByteArray workshop yesterday at Flash on the Beach. So far I have only gotten good feedback. I started losing my voice half way through the day but thankfully I had Thibault with me to help me through the rough bits. We learned for instance that it is apparently easier to write the number 100 as 0×64.
I was really happy that almost everyone in the workshop was able to connect to an FTP server and get a PSD file to display. Almost everyone also got a nice taste of the dreaded End of file error that happens often when doing ByteArray work.
You can now download the slides and the finished class files from the workshop. You can also use the ByteTrainer application if you need to brush up on binary numbers.
Lee








Great material, congrats.
Awesome, I’m a bit sad, because I thought than I knew more about byte programming, but this is just iceberg tip. I go study more about byte programming, maybe I become myself a Flash rockstar too someday.
thanks lee for the application
i study computer science in the university i found this information cool and easy cause it is my specialty i am so excited to learn more and more
Will you ever come to the Netherlands for some workshops ?
It is always in some far away land..
I learned about byte level operations in my C++ classes in college, but I rarely work at that level in ActionScript. Only sometimes when working with colors.
I’m really hoping to attend your ByteArray workshop one of these day so I can get a better understanding of how to effectively use ByteArrays and where else I can apply them. I feel like it would open up a whole new realm of possibilities to me.
Cool stuff!
Don’t know if you’ve ever used stage lighting, but the way you control stage lighting is through DMX channels and the way you set DMX channels which is very similar to how you come up with byte values…. Don’t know if that makes any sense.
Thanks for taking time to post this! Any gotoandlearn byte tutorials coming soon?
-a
Hi Lee, we are a bay area Flex user group. Every month we meet twice, once in Adobe office SF and once in Adobe office in San Jose. We would line to invite you in our meeting. How do we proceed with that? Or you just like the Latinos not the Bay area people? If really you like only Latinos then no problem, we can be that too!!! Amigo – habla espaniol?
Great Lee, thanks for sharing the sources and slides.
Thanks Lee
that was so helpful
I just wondering about when will you post your tutorials about this topic ??
I wish I could have been there. I had a free tix but it didn’t work out. At least you provided slides.
Hey great slides i was just wondering if anyone knew of any calculators that did byte operations (like the one in the slides) for windows? i searched google a bit but didnt really find anything.
@sonicsight the new calculator in Windows 7 has all the functionality that the OSX calculator does. Not sure of one for Vista though.
Hey Lee. Do you have any idea when Thibault plans to release his book on Byte Array/Low-Level Programming
Congratulations for the great work you’re doing!
Thanks!
Nice presentation – thx for sharing.
You have a minor mistake in the “A Practical example of Bit Setting” slide:
var bf:uint = 0;
bf = 128;
bf |= 64;
bf |= 32; //Set bit 6 to false (This is wrong – you set it to true)
bf |= 16;
bf |= 8;
bf |= 4;
bf |= 2;
bf |= 1;
trace (bf.toString(2));
will actually trace out 11111111 as you set all bits to 1.
Thanks for making this available! Are there any other tutorials, etc. that you can recommend for a beginner?
same comment as Junio Vitorino. bytearray is maybe for advanced developers, but these slides are for beginners in programming… it’s a bit frustrating. It would be interesting to have tricks, cuz if we are advanced developers and use bytearray, we know how to play with it and learn by our own…
Thanks for the great session on Sunday. You really showed me that everything is possible as long as you know what you’re doing. I wanted to get my head around bytearrays for a while and you guys gave me the nudge I needed. Perfect level of complexity for the examples as well. Good stuff!
Great article here for those that are new to programming (like me!) and don’t fully understand binary, bitwise etc.
http://www.gamedev.net/reference/articles/article1563.asp
Hey Lee
Thanks for a great day – started off the conference a treat. Now, you said to contact you should anyone discover why a bunch of the PSDParser apps were getting an unexpected EOF encountered error.
For me, it was the argument used versus the variable referenced in the uncompress method. I used FDT’s method generation to start it off rather than typing by hand and it created the stub:
private function uncompress(line:ByteArray):ByteArray {
return null;
}
Because this was called from uncompress(line), FDT automatically named the argument as “line”.
But, when coding the method on screen you used “ba” as the variable. In this case, “ba” was not a local variable but an instance variable – the instance variable that contained the file data!
Simply changing the argument “line” to “ba” fixed this for me. Although, later I changed both the argument and the local “ba” variable back to “line” to avoid confusion with the instance variable “ba”! Phew!
I can’t believe I didn’t spot that when we were there!! Hopefully that helps anyone else whose brains had gone a bit fuzzy by that point!
Cheers and thanks again to you and Thibault.
hey lee thanks for the post is there any way to WMV playback in Flash using these methods
thanks
i dont suppose theres a link or a hint you could give me to solve the end of file error. this is perfect for what im trying to do. love your site.