brettbrewer.com

Programming + Design

Home arrow News arrow Adobe Flash and Flex Programming arrow Flash v2 Components and Actionscript 2 Docs: Still crappy after all these years.
Flash v2 Components and Actionscript 2 Docs: Still crappy after all these years. PDF Print E-mail
Written by Administrator   
Sunday, 30 December 2007

I just wanted to vent a little bit today about the state of the Adobe Actionscript 2 docs. For years I have ranted and lamented how horrible and useless they are and today I once again suffered through hours of searching for a solution to a problem that:

  1. shouldn't exist
  2. should be much easier to find a workaround for

The problem is this: If you call _root.getNextHighestDepth() in Actionscript 2, you basically get a useless depth that collides with the Flash 8 depthManager's reserved depths. Nowhere in the docs is this mentioned.  The end result is that you get a wide variety of very strange bugs that are almost impossible to track down, even with the latest Flash 9 debugger. After hours and hours of troubleshooting and searching Adobe docs and forums, I finally ran across this post that clued me into what was going on:

"There is a movie clip called 'reserved' on level 1048575 and _root.getNextHighestDepth() will yield 1048576. But level 1048576 is part of the special levels that can't be properly unloaded and live in limbo in the player... meaning you will encounter weird bugs such as combo boxes not opening up"

Let me assure you, problems with combo boxes are the least of the strangeness, after all, what's strange about the v2 components not working as expected?...

One REALLY strange side effect of this depthManager collision is that all your movieclips that were placed on levels returned by _root.getNextHighestDepth() will simply disappear completely when you call the getTextExtent() method on a textFormat object. WOW. I literally spent all day trying to figure out why my movieclips kept disappearing whenever I was trying to obtain text metrics, and why I couldn't get alert windows to pop up in front of my dynamically generated movieclips no matter what I did. I couldn't even get Alerts to pop up on top of other clips using the DepthManager class. So, in short, something that should have taken 30 minutes today took over 10 hours. This is why I rarely build things from scratch in Flash anymore. The v2 component architecture is just a menace to productivity and I'm fairly certain that many of these issues remain unresolved in AS3. I've said it before and I'll say it again, Adobe has a major problem on its hands with the Flash documentation. The differences and inconsistencies between AS1, AS2 and AS3 combined with the quirks and bugs of the v1, v2 and v3 component architectures have turned Flash development into a horrible experience for everyone involved. All it would take to solve these problems would be to fix the horrible documentation and add all the workarounds and hacks to the liveDocs pages the same way the PHP docs have been for years. 

Okay, rant over. Time to finish the Flash quiz project I would have been done with yesterday had the Flash docs not been so utterly useless. 

UPDATE: Here's an obscure Adobe technote regarding some other side effects of this issue.

Last Updated ( Sunday, 13 January 2008 )
 
Next >

Search


Brett highly recommends...

Get Your War On: The Definitive Account of the War On Terror 2001-2008

My favorite comic is getting ready to be relased as a single volume. You can preorder now. If you hate the war and love to laugh, do yourself a favor and order this. You can also read all the GYWO comics online for free here.

BBS The Documentary

This is by far the most comprehensive and entertaining documentary I have ever seen regarding the early BBS system. If you're serious about knowing your internet history, or you just want some extra geek-cred, this is your new favorite documentary.

The Nada Chair "BackUp"

The best alternative I have found to overpriced ergonomic office chairs, especially for very low pain around the sacral joint. Works better than my Aeron chair ever did. Also, it comes in navy blue and black, in case you're not into the whole pregnant woman aesthetic (pictured).It's really not meant for sitting on the floor, it's really better for seats that offer poor back support, and works great at sporting events to make sitting in bleachers much more comfortable.

Antec Quiet PC Case

At just under $120 including a 500 Watt power supply, this "quiet pc" case has worked great for me for over 2 years. In fact I now own two great Antec cases/PSUs. For the money, it's hard to beat this combination.

Valid XHTML 1.0 Transitional

© 2008 www.brettbrewer.com

Spam bots check out this page.

Joomla! is Free Software released under the GNU/GPL License.