Posts Tagged ‘tutorial’

Creating a Chumby Configuration Widget

Friday, February 26th, 2010

In my last post, we quickly went over Writing your first Chumby widget. This time, we’ll expand on that by adding a configuration widget.

A configuration widget is another Flash file that sets up parameters for your Chumby widget, so those settings are available when the widget loads into your Chumby. For example, perhapse you have an analog clock widget. You could create a configuration widget that allows someone to choose a color for the face of the clock, or whether or not to display the second hand. The user could choose a color and save their preferences in the Chumby database. Then, when their Chumby loads your clock widget, it would look for and download any settings for that widget.

Here’s what we’ll need:

(more…)

Building your first Twitter application with PHP

Monday, February 22nd, 2010

I’ve written before about how great it is to work with a service that has a great API. Twitter was one of the tools that I talked about in that post and today I’m going to show you the basics of working with their API.

PHP is a great language for web applications, and it’s available with just about any web host. If you aren’t familiar with how PHP works, this tutorial will probably be a poor place to start. Today we are going to talk about how to work with the Twitter API and PHP, and you’ll need to know a few things about how PHP works to keep up. For a good refresher course on PHP, click here.

Click through and let’s get started!
(more…)

Challenge Update with Adobe Illustrator Tips

Tuesday, February 2nd, 2010

014-Paper-Letters-vs-the-AbyssAt the beginning of last month, as a new year’s resolution, I accepted Smashing Magazine’s Design Something Every Day challenge. I am happy to report that I have not fallen off the wagon. I have created and posted to Holodek 365, my blog, every day since January 1. Let me tell you, it is quite a commitment. It is not as easy to find time every day as I thought it would be, but the persistence seems to be paying off.

My thought for the first month was to strictly do Adobe Illustrator tutorials. These became something to fall back on when I was feeling uninspired which so far has been about half the time. I cannot believe all I have learned from following these few tutorials—everything from basic commands that I should know (or have just forgotten) to advanced techniques.  Thought I would share a few of the simpler ones because they have come in super handy since I relearned/discovered them.

To scale just the pattern that has filled a shape, select the shape, bring up the scale tool’s dialog box by double clicking on the tool in the toolbar and check only Patterns in the Options section and then type in a scale percentage.

pattern

Cycle through color models in the color panel by shift clicking the spectrum bar at the bottom of the panel.

cycle

Option + Command click and drag a slider in the color panel to move the other sliders in relation to it. This keeps similar color but with a different tint or intensity. (Especially helpful in RGB mode when creating a gray.)

click-and-drag

Make a layer a “Template ” layer buy selecting Template from the Layer Panel’s fly-out menu. This will lock the layer and make the graphic transparent for easy tracing.

template-layer

16 two-color gradients are much more manageable than one 17 color gradient.

gradients

I have also learned that sometimes rasters have their place in Illustrator (especially drop shadows). Most the rasters I used were eventually vectorized and/or live traced to achieve some great effects I never thought possible.

Hope you find this useful. Here’s to another successful and productive 333 days.

Writing your first Chumby widget

Monday, February 1st, 2010

tic-toc-goes-the-clockSo, you got your first Chumby and have browsed through the 1500 open source widgets, and now you’re ready to contribute to the open source community by writing your own widget. There’s lots of resources out there, so we’ll just cover the basics here.

Here’s what you need:

  • A Chumby
  • Adobe Flash or other developing environment for creating SWF files
  • An account at Chumby.com

Open up Flash. Set your size to 320 x 240 and frame rate to 12 frames per second. In Publish Settings, set the Player to Flash Player 8 and the Script to ActionScript 2.0. Chumby allows widget up to 100kb in size, which is plenty of room for code, but can get tight when working with audio and video.

For this tutorial, we’ll make an analog clock. But there are hundreds of clocks already! Yes there are, but I like to have every other widget be a clock, and I’ve only found about a dozen clocks that I really like. That is one of its primary functions, after all.

First of all, set up your assets. You’ll need three clock hands, positioned in the center of the stage, with the registration point properly set. Name them hourHand_mc, minuteHand_mc, and secondhand_mc.

OK, now the code:

onEnterFrame = function() {
	dt = new Date();
	//set hour hand
	hrs = dt.getHours()+dt.getMinutes()/60+dt.getSeconds()/3600;
	angle = hrs*30;
	if (angle!=hourHand_mc._rotation) {
		hourHand _mc._rotation = angle;
	}
	//set minute hand
	mns = dt.getMinutes()+dt.getSeconds()/60;
	angle = mns*6;
	if (angle!=minuteHand_mc._rotation) {
		minuteHand _mc._rotation = angle;
	}
	//set second hand
	scs = dt.getSeconds();
	angle = scs*6;
	if (angle!=secondHand_mc._rotation) {
		secondHand _mc._rotation = angle;
	}
}

Let’s break it down. On each frame we create a new date object. Then we get the hours of the date object. We also add in the minutes and seconds because we want the hour hand to move a tiny bit every second, not just once an hour. Next we convert the hours into degrees by multiplying by 30. (360 degrees per 12 hours makes 30 degrees per hour). Next we check if the hour hand needs to be changed. It should only be changed once every 12 frames, not every frame. Using this if statement prevents unnecessary redrawing of the screen, which can save processing time and make a widget run more smoothly. Though, you’ll probably not notice any difference in this simple example.

The minute hand and second hand go through the same process.

OK, save it, publish it, and upload it to Chumby.com, but don’t make it public yet. Add it to a channel on your chumby and try it out. You’ll undoubtedly find lots of things to tweak with your clock. Did you even give your clock a face? Maybe it needs a tick sound, or a gong on every hour. Maybe you don’t want a typical analog clock. Changing the code for a digital clock should be pretty easy.

This is a simple example, but it should get you on your way. In my next post, I’ll write about creating a configuration file, and playing with the accelerometer. (unless I forget or change my mind). Until then, make a cool clock.

Flash Camera

Monday, December 14th, 2009

The Flash plugin is required to view this object.

On a recent project (which will be revealed later this week) we needed to save an image created in a Flash application, using AS3 and PHP. It turned out to be really easy. Here’s how we did it…

(more…)

Going Vintage

Wednesday, October 28th, 2009

Lately, I’ve been inspired by vintage photography. I love its naturally faded colors, vignettes, and soothing tones. I’ve been on the lookout for Photoshop tutorials that will add bit of that historical and airy elegance to my own projects. On my search I found two tutorials, one focusing on a vintage feel, and another recreating a Lomographic style that gives a blurry and colorful look that you often find in the original analog photography. Below are two examples using both tutorial techniques, one features a muted pink tone, while the other focuses on a more contrasting, blurred effect. If you would like to share any additional ways to achieve a vintage style, I’d love to hear it.

Vintage_Tutorial

It’s Smoking

Wednesday, October 7th, 2009

I traveled to the coast last week for a nice relaxing vacation. Being born and raised an Oregonian, I’ve spent many, many of my vacations at the beach. I like to go there because generally, I’ve seen what there is to see and done what there is to do, so I’m more inclined to take walks on the beach and for the most part snuggle inside and enjoy the changing weather (Don’t worry, I didn’t get swept away by the potential Tsunami). I also love, love, love to watch TV shows that I never see on a regular basis. I checked out many episodes of Cash Cab and the Price is Right, and even a little Dog Whisperer (I don’t even own a dog, but that show rocks). Meanwhile, I missed my DVR and longed to fast forward through commercials.

I can’t say that that watching the commercials was a complete bust, because I did catch on to a cool new trend: smoke art. In a couple of the ads I spotted the use of smoke interacting with a type treatment or image. The effect used black smoke on a white background, creating a high-contrast, dramatic effect that was both eerie and beautiful. Upon further research, I also found a variety of gorgeous smoke images using brilliant colors.

I loved the effect of the smoke in the TV commercials, and it got me interested in finding out how I can create a similar look in my own designs. I found a few tutorials on how to create my own smoke effect in Photoshop and Illustrator, as well as some helpful brush sets, but I think the most dynamic images are when smoke has been photographed and then incorporated into a layout. I’m very curious to try a few of these techniques, and can’t wait to see more from this emerging trend.

Smoke

For Independence Day set off some particle effects!

Thursday, July 2nd, 2009

FireworkWith Independence Day (Fourth of July) just a couple days away, I thought I’d share some fireworks. But these ones are safe and eco-friendly. And, to save you some cash, I’ll show you how to make your own fireworks! Sorry, pyro-maniacs, we’ll be using Flash AS3 to generate safe particles. Take a look at the fireworks show I’ve created in Flash, and if you’re interested in creating your own, follow along with my instructions.

Here are our requirements:

  • create a particle effect that resembles a firework burst.
  • vary them in size and color.
  • celebrate our independence.

Let’s get started!

(more…)