Google’s Documentation Sucks
11th November 2008 | 0 Comments
Google makes some pretty cool stuff and its generally is well engineered, except for that Android bug. I recently had to use Google's Flash map component. First of all, they need to make an MXP so it installs correctly instead of having users manually place it in the components directory which is hidden deep in the filesystem. Second, some of their documentation is utter crap. The Marker class has a property called gravity. I have no idea what it does, but it sounds interesting. So after consulting the documentation i found this little gem of a description:
A Number value that specifies marker gravity factor.
Why bother even wasting your time writing that, its a totally worthless description.
Code Courtesy
7th November 2008 | 0 Comments
As a programmer you get to see a lot of people's code and more often than not you have to change some of that code. Sometimes all you need to do is change a sign or the order of a variable or two, but most of the time you have to make a modest change. Now if that change has to go back to the orginial owner its a common courtesy to comment it. Especially if there are hundreds or thousands of line of code within a project. So why am I stating the obvious? Because a co-worker of mine recently had a run in with a senior level engineer at another company. This engineer didn't comment his changes and then had the gall to say "Can't you read code?" when asked to do so. What kind of response is that. Of course I can read code, but when I don't know what you changed it makes it a little hard to find those changes especially when there are over a thousand lines.
So the lesson here is don't be an asshole and comment changes you make to someone else's code.
Working with Embedded Assets in AS3
12th July 2008 | 0 Comments
I've been working with embedding SWFs in a pure AS3 project using the Flex 3 IDE and I ran across a little problem. All the examples just embed a SWF or JPG and use them directly on the stage. While this is fine for most instances, I needed to change the value of the TextField in my symbol. Embedding just a SWF won't allow you to do this. You have to use a symbol within an embedded SWF. All you pretty much have to is add the symbol property into the metadata line, like so.
[Embed(source="assets/icon.swf", symbol="number")]
private var Icon:Class
Flash+Firefox+Mac+transparency=Uh oh
12th December 2007 | 0 Comments
So I was making a flash video lightbox today (and part of yesterday) and i kept running into a weird error in Firefox. Parts of the flash movie weren't showing up. At first I thought it was some weird issue with ThickBox, so I wrote my own lightbox code. But that exhibited the same problem. So I decided to test it in safari and was surprised to see it worked fine. A quick boot into Parallels and I found that IE and Firefox worked fine too. So now I was left with a Mac specific Firefox rendering bug.
It seems when you place HTML content over flash content, you cannot use the CSS opacity property. Instead you have to use a tranparent PNG and fake what ever you where doing. Not the ideal solution, especially considering that I had to use browser detection...yuck.