Flash
Just an idea…
by Josh on Jan.29, 2009, under Flash, Flex
Have you ever launched a new Flash or Flex application, only to start receiving reports of it crashing, but there are no other details to work off of other than “it’s broken”?
I’m sure I’m not the first person to want this, but I thought of this recently: How awesome would it be if the Flash Player provided the option to send a bug report or crash log back to the developer if they wanted to receive them?
Pop Quiz on Static in AS3
by Josh on Jan.28, 2009, under ActionScript, Development, Flash, Flex
Pop quiz: In AS3, are static methods & variables inherited by subclasses?
Flash Waterfall Bitmap Effect
by Josh on Jul.03, 2008, under ActionScript, Flash
I saw this effect a long time ago, and wanted to use it in a project, but after about ten minutes of searching for the original, I gave up and just decided to make my own.
Click on the image above to view it in action.
This is just a basic bitmap effect that uses BitmapData to draw an image, with the pixels spilling down from the top in a waterfall-type effect. The fun thing about this is that since the source of the effect needs to implement IBitmapDrawable, you can supply just about anything as the source. In the example below, select “This Panel” to watch the options panel be redrawn. The end effect is that each individual piece of the panel is “beamed down” on it’s own. The “Flow” image is another favorite of mine.
The ’speed’ option is simply the number of milliseconds used in the Timer to execute the effect.
Source is also provided, just right-click on the example to get it.
Anti-aliased Device Fonts in Astro
by Josh on May.20, 2008, under ActionScript, Flash
By now you’ve seen and heard plenty about Flash Player 10. One feature that I’m in love with right now is the new text rendering provided by Saffron 3.1. Among other things, this provides better anti-aliasing for fonts, including device fonts.
Why does this matter? Because now you can use device fonts in your TextFields, and do things like adjust their opacity, or rotate them without needing to embed the font. How sexy is that? Obviously, if you’re using a custom font, you’ll need to embed that, but for device fonts, it’s no longer a requirement just to adjust the alpha value of a TextField.
Check this out (You’ll need Flash Player 10 installed).
Download the source: AstroTest.as.
This is a really simple demo, but it’s enough to get the point across.
Twitter Blocks
by Josh on Sep.12, 2007, under Flash, Web
Twitter Blocks is a kind of interesting way to visualize Twitter. It’s a Flash app that loads a timeline of tweets and arranges them in a 3D grid. It looks like it was launched about two weeks ago, and is a joint project between the folks at Twitter and Stamen Design.
(continue reading…)
Using trace() in ActionScript 3.0
by Josh on Aug.27, 2007, under ActionScript, Flash, Flex
The global trace() function is probably the simplest, and most useful methods of debugging that ActionScript developers have. Usually, it's used to output the value of a variable or to broadcast out a little note that some event occurred. Most people use it something like this:
-
trace ("myVar: " + myVar); // outputs value of myVar
-
-
if (somethingGood) {
-
trace ("something good just happened!");
-
} else {
-
trace ("Houston, we have a problem!");
-
}
Well, now in AS 3.0, trace() has been modified to allow multiple parameters! What's so cool about that? Well...
Instead of this:
-
trace ("user name: " + lastName + ", " + firstName);
you can do this:
-
trace ("user name:", lastName, firstName);
Or, simply output a list of variables all at once instead of using multiple trace() calls:
-
trace (address1, city, state, zip);
Not exactly earth shattering, but it's definitely a welcome addition to ActionScript.
Flash, I wish I knew how to quit you.
by Josh on May.17, 2007, under Flash
Ever have those times where you know you're staying up too late working on something, but you just can't quit coding? Happened to me again last night. Literally:

Using CMD-Q still worked fine, but I've never had Flash try to prevent me from quitting it like this before.
Flex Posters
by Josh on Apr.19, 2007, under Flash, Flex
Just received my Flex & AS 3 posters in the mail the other day. These things are awesome! I'm still trying to figure out how to hang them in my cube, so if you have any good ideas, let me know.
Also, a big thanks to the Flex team for sending me extra posters for our user group to give away in our raffles.
LogWatcher - trace() output in Eclipse
by Josh on Apr.12, 2007, under ActionScript, Flash
If you're an obsessive trace() statement user like I am, and you happen to use Eclipse for your ActionScript coding, you're going to love the LogWatcher plugin.
http://graysky.sourceforge.net/
If you have your Flash Player setup to log trace() statements and other errors to a text file, just point LogWatcher to the location of your Flash log text file. Even when testing from the Flash IDE, this text file will still be updated, and LogWatcher will pickup the changes. Essentially, you now have a duplicate of Flash's Output Panel in Eclipse. You'll no longer need to switch between Eclipse & Flash just to see what you happened to trace out when trying to debug something. I'm not sure how it works on Windows, but on OSX, if Flash isn't in focus, then all of the panels disappear - meaning that you can't look at your Output Panel and your code in Eclipse at the same time.

LogWatcher also includes the ability to set filters, to make it easier to find what you're looking for. Need to find a single line in a sea of other trace output? Just create a filter, and let LogWatcher color that line red for you each time it appears.
Princess
by Josh on Apr.04, 2007, under Flash, Random
Been a long time since I last posted, but this needs to be mentioned:
Princess is a great music video/Flash game hybrid. From the site:
Rektor has teamed up with Agens, a scandinavian flash design bureau, in order to present a new breed in online gaming: the world´s first playable online music video.
The song is unique - it's still stuck in my head - and the gameplay is pretty fun. It's pretty basic, but it reminds me of the Wario Ware series - it's a series of little minigames strung together to help tell the story through the video, and you'll be changing the type of minigame being played throughout the story line.
It's a lot of fun, and I think it's a great idea.
