Sunday, February 14, 2010

The Colors!



Large version.

This is a result of me learning a bit about adjusting the color of a movie clip via actionscript. It was surprisingly very easy! Here's a quick trimmed down version of it. Keep in mind, this is contained within the onLoad function of a the colored panel's Class file.

var colorful = new Color(this);
var colorTransform = new Object();
colorful.setRGB(0x003366);
colorTransform = {ra:Math.random() * 100, rb:'0', ga:Math.random() * 100, gb:'0', ba:Math.random() * 100, bb:'0', aa:'100', ab:'100'};
colorful.setTransform(colorTransform);


The first line sets up a Color object and assigns it "this", or whatever movie clip you want it to adhere to. After that, we create an Object called "colorTransform" which will contain all the information for the actual color transformation. That information includes, as you can see, a long list of parameters such as "ra" and "ba". It seems like a long list, but there are essentially two types of parameters that relate to the red channel, green channel, blue channel, and alpha channel. The three I'm dealing with here are the ra, ga, and ba parameters which is a number from -100 to 100 and controls the percentage of that parameter's color. So, something like ra:100, ga:50, and ba:50 would yield a pinkish color.

Once we've set up what the colorTransform IS, we simply set it to our original Color object. Simple, eh? You can experiment a ton with it and even set up color tweens with this.

Bonus! You can use this on photos, too! Just be sure to set the imported picture to be cached as a Bitmap and the above code will work on it.

Enjoy!

Wednesday, February 10, 2010

Silver - the Musical

Hey everybody, I just finished up helping a buddy put together a site for his upcoming project.

It's called Silver, a musical based on Robert Louis Stevenson's Treasure Island. Check it out!

Sunday, February 7, 2010

Bing!



Large version here.

This little guy started out life as a simple sorting experiment. Originally, the falling discs would pass through the flashing white "sensor" and be sent to a different column based on their color and type. Once that was out of the way, I decided to add a few more things. For one thing, why not give the user some feedback when a disc leaves the stage? The version just prior to this one had no user interactivity; you just watched the discs falling and they'd "bing" as they left the stage. Due to the random nature of their spawning, it produced some nifty little melodies. Never anything TOO intricate (we are just dealing with 4 notes here...), but enough to be amusing.

Though I was rather pleased with the non-interactive version, I wanted to let the user feel like they were having an effect on the little Bing World. So, I slapped in an Breakout-style paddle that let the user keep a disc from being instantly removed. Next came some wrestling in my mind. Do I want the user to just influence what happens? OR do I want the user to CREATE what happens? In other words, should sounds come only if a user does something, or should the sound ALWAYS happen - the user just redirects it? In the end, I decided to let the user create the sounds, so a disc won't bing unless it has been first been hit by the user's paddle.

What do you think? Would you like to see sound happen even without user input? Or is it a better feeling knowing that, in a way, you created a quasi-composition?

And another thing...are the sounds too annoying? If anybody has any ideas on different sounds, let me know (or better yet, send them to me in .mp3 format - if it's nifty enough, I'll put it up here!).

Anywho, take care everybody. And enjoy.

Thursday, February 4, 2010

Updated Embers

Hello, just letting you all know that the source code for an updated version of the previous Embers.swf is now available on My Media House.

Enjoy! By the way, exporting as an .html and setting it as your desktop wallpaper gives a little life to your desktop. Just...be careful not to overdo it.

Monday, February 1, 2010

Since the last one did too much...



Large Version Recommended.

In a departure from the previous project, I whipped up something that's just fun to look at. When the .swf loads, you'll get 4 little orbs of light that fly around randomly, leaving a trail of glowing embers. You can hit one with your mouse to cause it to pause and grow a bit. Clicking will produce a brand new one.

So nothing TOO crazy here, but each ember's flight path is based off its previous position. Every frame, the ember looks at its current move speed and then varies its vector by a small degree (between -.5 and .5, which when added 31 times per second really adds up!) In other words, you get generally smooth arcs instead of rapid sudden changes in movement. If you wanted to produce a slower, lazier arc, you'd just put a bit of a delay in the change in position. Maybe have it adjust its flight path every 15 frames instead of every single frame.

So, enjoy and gaze a bit!

Saturday, January 30, 2010

Links

No real blog update at this moment, but I wanted to bring your attention to a new section to the right of the blog. I've added a spot reserved for links to other sites that are of interest to me. The first is a link to My Media House, a site that's just getting revved up. Right now there's a nice batch of FREE stock files including a few photos and Flash files. Expect this site to grow in content in the near future! I plan to be contributing to this site often.

Also added is a link to Oxygen Education, my current place of employment. For those interested in how Flash is applicable to an educational setting, take a look! Or take a look if you just like really nifty-looking interactive programs based in Flash.

Well that's it for the moment!

Wednesday, January 27, 2010

Wahoolazuma!



Big version here.

I'd heavily recommend downloading the .swf and running it from your local machine, but through a web browser is fine, too.

First off, let me say this game was inspired by Larry Marder's Beanworld. If you've not checked it out, it's definitely a fun read! Equal parts quirk, wonderment, and charm, it makes a great gift for just about anybody!

In Beanworld, the behaviors and lifestyle of the native beans are explored. Though it seems to be a pretty contained system that makes some sense, the nature of the beans is a simple one, often left to the imagination. In other words, a wonderful source of inspiration for fun little mini-games!

In case you're wondering the story behind the above game...well...go read Beanworld yourself!

By the way, this is a simple, rough version. If I were to create a game for anything other than my own personal learning experience, there are a few things I'd change. Any suggestions? I just might touch something up if you demand it!

EDIT: So it seems you can't score any points UNTIL you get a multiplier. I'll fix that up...soonish.