WordPress Widgets and Flickr RESTful APIs

I have done some significant WordPress modifications for friends in the past, be it basic theme manipulations or custom hacking of plugins, but I decided that I wanted to write my own widget to help tie my Flickr account into my blog. I did some searching on the currently hosted WordPress plugin site, and while there were several that tapped the Flickr API, they all seemed too clunky or not quite flexible enough for what I had in mind. Simply listing the most recent thumbnails from my photostream couldn’t be that hard, right? As it turns out, no, it wasn’t.
Continue reading

Starbucks Free Coffee Day

Starbucks for Kids

Starbucks is offering free coffee today!

So, I was greeted by a very exciting thing this morning: news that Starbucks is giving away free coffee today! Yes, by bringing in a reusable mug to your local Starbucks coffee shop, you can obtain a full dose of caffeinated goodness. Interestingly enough, I had just taken my son by our closest shop and rewarded him for a job well done with a steamy cup of hot chocolate this week, so I thought it fitting to post the picture along with this little reminder. So, get out there and get your coffee, and feel free to wonder just how much free coffee Starbucks might go through in the Seattle area alone.

Line Movement and Interaction in AS3

For quite some time now, I’ve been trying to figure out the best way to get lines to “move” in AS3. By this, I don’t mean simple rotation and skewing of an existing line, but actually changing the line structure: length, thickness, etc. The challenge first became noteworthy when I was working on my Tower Defense code, and I wanted to have a laser-esque tower that would shoot constantly at an enemy rather than launching projectiles. In other words, I wanted the origin point of my segment to be stationary while the other end of the segment follows the targeted creep. Based on some old Java graphics experience I have, my first thought was to re-render (literally create and destroy) the Sprite object housing the laser on a timer or Event.ENTER_FRAME. However, this immediately proved to be a poor decision, since it caused a horrible flicker, just like a Java applet that was animating without double buffering. So, needless to say, I needed to dig a little deeper into the core of the AS3 Graphics object.
Continue reading

Particle Generation and Management Study

Over the past week, I have had opportunity to play with some ideas for particle generation that have been floating around in my mind for a while. Why particles? Well, while single object animations are great, there is a certain level of realism to movement in everything from explosions and fireworks to dust and debris when your environment can act upon the individual particles that make up your animation. Enter the particle generator. Instead of simply embedding an explosion movie into the appropriate scene, we can instead render a particle generator. These generators will then produce the debris for our effect, and each element (or particle) of that debris will be able to interact with its environment – from gravity to boundaries. By calculating each particle to have a mass of its own, the effects can be quite pleasing.
Continue reading

Adding Links to a Dynamic Flash AS3 Slideshow

Those of you who may have followed my previous Flash AS3 Slideshow post may have noted that it was rather limiting in function. While there are sometimes valid uses for a slideshow to statically transition between images (whether or not those images are dynamically loaded), there are typically much more useful things we can do in the presentation. In this post, we will review how to add an optional link to each slide in the XML data that will then turn the individual slides into hyperlinks whenever they are displayed.
Continue reading

A Princess Tea Party

Princess Cupcakes

Princess cupcakes made the day


Before your have to ask, no, it wasn’t for me. My eldest daughter turned eight this week, so to celebrate, my wife and I threw her the party she’d been dreaming of for months: an all out princess tea party. There’s a local Tea House about three miles from our house, and with their great pricing, we reserved their party room and had my daughter invite about ten of her friends to join her. I got a few good pictures at the party, and I did a quick portrait of each of the girls as they left which we printed and gave to their parents as a thank you for letting them attend.

Here are a few of the shots I was able to get. Let’s start out with some amazing chocolate, raspberry filled cupcakes we had a friend make for the occasion:
Continue reading

How to Manually Trigger Events in JavaScript

Occasionally, I find need to be able to manually trigger a predefined JavaScript event from within the context of a web application. Those of you who didn’t understand that first statement may want to stop reading now or risk suffering from extreme boredom, but those who actually have encountered the same challenge in coding, please read on!

Let’s examine a possible scenario that could merit actually taking hold of the reigns on individual event calls. Consider the situation that you have devised a very user friendly data entry form, and in conjunction with specifications, you have a select box that triggers certain fields to be visible based on user selection. Typically, you would have simply attached a listener to the select box’s onchange event that checks the value of the field and performs the necessary showing and hiding. So far, we have done nothing difficult or out of the ordinary.

Now, suppose you also have need to be able to populate the form with a preexisting data set and get your form to behave in the same way. You could always write an onload listener for the body of your page that runs all the field checks and manipulates the fields accordingly, and in most cases, this may not be a poor solution. However, when loading dynamically via AJAX or other method, the onload event may not be triggered, and therefore, neither is your form updated.
Continue reading

jQuery Slideshow Plugin Update

I have finally found a few spare minutes to refactor the Google Code Project I started for my jQuery plugin last year. While I still am far from where I want to be with it, I have managed to set the plugin into a fully OOP codebase and add in events and the capability for custom handlers on those events. My hope is that people will now be able to find a bit more usability to the slideshow, since it is fully customizable. Feel free to swing by my Google Code page and let me know thoughts or ideas on ways to improve the slideshow as it evolves.

Introduction to Manual Compiling with Flex SDK

So, many of you have sent me emails or asked me in person about how, exactly, to get started playing with the Flex SDK without having to pour any money into unnecessary resources or IDEs. First, let me say that purchasing and using Flex Builder will be one of the best investments you can make in your Flex development learning, but yes, you can indeed download the SDK free of charge and manually compile AS3 and AIR applications. This will be a very simple post dealing with just how this can be done. While there are many, many, many details we could approach, I want to tackle this issue in its simplest form and hopefully get people on the ground running within minutes of reading this post. Please note that this will be written for Windows users, though I highly recommend people set up a Linux environment and play with the command line tools there as well, if possible.
Continue reading

Dynamic XML Slideshow in AS3

Over the past year or so, I have been responsible for developing and maintaining a JavaScript Slideshow component for our internal CMS. With the similarities between JavaScript and Actionscript, I have wanted to implement this slideshow in a manner consistent with the flexibility and usage of the JavaScript version. The biggest difference is that the JS one is focused on content, and the AS3 version will be focused on pictures – since AS3 does not fully support markup and CSS yet. This being said, I have had opportunity to attack my project and have the first phase completed. As with so many of my other personal projects, I’m tackling it in phases rather than having a defined spec list ready to go. In this case, I have the slideshow reading an image list from an XML document, loading the individual pictures and setting them on a timed rotation.
Continue reading