September 30, 2003
New Adobe Photoshop/ImageReady exports SWF
The newly announced Photoshop upgrade exports SWF animations. That's a surprise.
I like the way software companies compete with each other by supporting their formats. It makes everything more interchangeable.
Better yet, the new Photoshop line is labeled "CS". Photoshop CS. Illustrator CS.
Hmmmm...sounds a lot like another software firm we know that had a suite of products named a similar way a year ago...maybe they should have called it "Photoshop CS Professional 2004."
September 23, 2003
easy array output
Here's a handy way I found to output the contents of an array in an easily readable way, with a single line of code.
trace(myArray.toString().split(',').join('\n'));
It takes the toString output of the array, which is comma-delimited, then does a find and replace, inserting linebreaks where the commas were. This keeps you from having to write a "for" loop just to output the contents of one array.
You could also use the array.toString.split.join trick to populate a textbox with the contents of an array, in order to display a list of items.
-- correction --
I was quickly corrected in the comments: skip the toString & split and just do trace(myArray.join("\n"));
"It looked like a good idea at the time..." :)
Chank fonts
I love Free Chank Fonts. Always have. I don't always have a chance to use them, since they're a bit unusual, but they are still cool all the same.
September 17, 2003
Flash games at their finest.
Ferry Halim's Orisinal is a great site, with his Flash games being as good as any I've seen. Simple, addictive and beautiful.
I have enjoyed this site's great games for a while now, so I thought I would point it out to budding Flash game programmers out there as something to learn a few tricks from.
September 16, 2003
ground's text editor component updated to 2.0
The new ground TextEditor v2.0 is available over at ground.gr.
Igor has done a great job on this update of his rich-text editing component. I've been using the first version for a while now, and it was already a life-saver. This new release adds so many new features, including dynamic targeting of text fields, new HTML methods such as Autolinking, and more.
September 09, 2003
Double-buffering in Flash
Today I was trying to figure out how to double-buffer in Flash. When you dynamically draw elements on the screen, and then need to redraw everything with new content, you would normally see everything clear, then the new elements appear.
Double-buffering is when you draw in the background while having the existing screen contents in place until the drawing is done. Then the newly drawn content is "popped to front" and the buffer cleared.
What I ended up doing was dynamically generating the contents of my screen as usual into my main movieclip called "screen." Then I rename the movieclip to "buffer" using movieclip._name (which is a writable property!), and swap the depth to place it on top. I then create a new empty "screen" movieclip behind it, and run my drawing routine again for my next screen. Once the new contents of "screen" are drawn, I remove the "buffer" movieclip. Since I am always drawing into the existing clip called "screen," I didn't have to rewrite my drawing code at all, or have to figure out some way to clone a movieclip with all of its children and their UI elements.
This worked really well. I have some problems knowing exactly when my drawing routine is finished, since loadMovie doesn't have a true onLoad() event, but it works fairly well.
It may not seem like rocket science to you, but I was overjoyed at how easy and effective this modification turned out to be.
September 04, 2003
Dissecting Spam
Due to the fact that I've had a website online for over 7 years now, I get a lot of spam. A lot of spam.
I do get some chuckles from some of the subject lines used to try and trick me into paying the slightest bit of attention. I'll skip over the kind of disgusting stuff aimed at the adult crowd, and cover some of the less offensive yet strange goings on. Here are some of the subject lines I have received recently, and my response at first glance...
"The server is down"
If my server being down inconveniences you, Mr. Spammer, I'll try to take it down more often. [delete]
"boron"
I find it strange that someone thinks people are so desperately interested in the latest information on the fifth element of the periodic table as to open this crap. [delete]
"Did you lose my MSN?"
If you were dumb enough to sign up for MSN, I'm not surprised to learn that you think I have misplaced a multimillion dollar Internet Service Provider facility. [delete]
"I don't even know"
And I don't even care. [delete]
Spam is the bane of my existence. Messages sent by crooks and thieves using stolen servers and forged accounts. Earthlink keeps winning lawsuits against these people, and all I can say is:
Hire more lawyers and keep up the good fight.