🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

What I need!

Published April 08, 2004
Advertisement
What I really want is a Flash reference that documents everything, including all of the quirks.

For a while I'd been using Colin Moock's ActionScript reference, and that was quite nice. I wanted to get something that covered ActionScript 2.0, so I just got the new Macromedia Press ActionScript 2.0 Dictionary (which has the best price/page ratio I've seen in a while at $17.50 for 1080 pages, but I digress). Neither book, however, did a very good job of covering some of the little sneaky bits here and there that JUST DON'T WORK RIGHT!!!

For example, suppose you want to see if a key's pressed. Flash has a nice little callback already set up, so you simply do the following:

onKeyDown = function()
{
if (Key.isDown(Key.SPACE)) trace('you just pressed the space bar');
}

Simple, eh? Now, suppose you want to check for a tab key. The Key object has a TAB defined, so you think you could just check for Key.TAB. Right?

WRONG!!!

All of 'em work except for Key.TAB. Checking out Google and the newsgroups, it appears that Key.TAB doesn't work because Flash's component model has reserved it for tabbing through Flash components. If you press the tab key, It'll automatically highlight the next button on the screen, and that tab gets absorbed. Far as I can tell, there's no way to shut off tabbing through components, so there's no way to check for a tab-press if you've got components on the screen.

O'Reilly used to have a great series of books called 'Annoyances', like Windows 98 Annoyances, that documented all of the little bits of a system that didn't work quite the way you think they should. At best the books documented how to get around the annoyance, and at worst they confirmed that you weren't going crazy and that something that should be blindingly obvious (like above) indeed doesn't work like you think it should.

I need Flash Annoyances, and I need it soon :)
Previous Entry Good Java Freebie
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement