Tag: Flash
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?
re: Thanks Bro.
by Josh on Dec.19, 2008, under wtf?!
Last night I received the following email through my blog, referring to the Flash version of Duck Hunt that I built a few years back:
From: thanksbro@gmail.com
You know, it’s sort of annoying when people get arrogant and try to put in some terrible protection.
com.joshbuhler.games.utils.TheftBlock.checkURL("www.joshbuhler.com", this);I’m sure anyone who wanted to host your game could just as easily decompile it as I did. I only did it to put it on a flash drive, as well. Having your name on the main screen isn’t enough?
Huh? A few things:
(continue reading…)
w00t! - I’ll see you at MAX!
by Josh on Oct.08, 2008, under Flex
It’s been quite a while since I’ve posted, and here’s one of the reasons I’ve been so busy lately…
iamdeepa on flex ยป Josh Buhler, Brian Telintelo - See you at MAX!
Once I get one more project taken care of, I’ll be able to get back into a more regular posting schedule again. Until then, see you in November!
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.
Flex Builder Cheat Sheet
by Josh on Oct.08, 2007, under AIR, ActionScript, Flex
Sure, there are several places out there where you’ll find this information, but nothing really in an easy-to-print form you could hang on your cube wall.
This list is far from comprehensive, but it’s a list of the ones I use most often, and find the most useful. There’s a reason I made the first one on the list “View all Shortcuts”.
As I’m a Mac user, the shortcuts are for the Mac version of Flex Builder, but I would assume that you Windows folks can just use Ctrl instead of the Command key.
Here’s a nice PDF, ready for printing: FlexBuilderShortcuts_MAC.pdf
If there’s something you really feel strongly about me having left off of the list, let me know in the comments, and I’ll add it to the list.
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…)
AIR / Apollo Pocket Guide Free Download
by Josh on Aug.30, 2007, under AIR
Just a reminder of a nice resource available for those of you developing AIR/Apollo apps. Adobe has the full PDF of the Apollo for Adobe Flex Developers Pocket Guide available for download from labs.adobe.com.
You can also buy the book in print form, or, save yourself $15 and get it now.
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.
