Saturday, January 9, 2010

Wind Redux!



Large version.

I decided to go back to the .swf from a couple of posts ago and add a few features. I think that this really shows how this could be formed into a useful application.

Controls are the same, but now rolling over any of the particles with your mouse allows you to see a few scraps of data from it, including:

  • the ID (based on when it is added to the stage)
  • the type (in this case, based on the color)
  • the weight (which determines size and speed)
  • the speed on each axis at which the particle is moving

Thursday, January 7, 2010

Letter Scramble (WIP)



Large version.

Okay, this project is not quite 100% finished, but I'm not sure what else I'm going to do with it.

Not much to say about it. Type something in the white field and then click the grey INPUT button. Once the button is clicked, whatever is in the text field is split up using Flash's .split() ability. Each letter is sent into an array in order. From there, a movie clip is added for each letter. This movie clip has a target letter which is what we want the movie clip to ultimately display.

The randomization is achieved by having an array of possible letters (a-z, and A-Z). Every 2 frames, the text field is filled with a random letter from the array until this swap has happened a set number of times (25*letter position+10). When the set number has been reached, BAM! The field is then filled in with that target letter from earlier.

I plan to flesh this out and maybe even use it in a useful way in the future, so if you have any suggestions, let me know!

EDIT: Linda asked about having all of the letters stop at the same time. Here's a .fla file that contains the code that does that.

Wednesday, January 6, 2010

Any way the wind blows...



Click and drag the green gem on the above .swf.

Large version here.

I was going to post something about randomizing text with input fields, but this little guy popped into my head on the drive home from work. At my place of work, Oxygen Education, I recently helped a co-worker develop a wind turbine simulator. It was fairly simple, where the _rotation property of a movie clip changed based on where a specific draggable movie clip was.

Well, I decided to take this concept a step further and control an entire ARRAY of movie clips with it. And I thought to myself, I thought "Well, why not allow movement in all directions?"

And so I did. A simple for loop adds the bead movie clips to the stage at random positions. As they are added, an empty variable called "weight" is filled in (which I've set as a number from 1-10). The weight adjusts how large the object is, and also has an effect on the movement speed. You'll notice the larger, and therefore "heavier", beads move a bit slowly. This is accomplished by setting the movement rate to a number multiplied by a decimal (determined by the weight).

So there you have it! Another useless, yet fun to watch, Flash experiment!

Monday, January 4, 2010

Placeholder

Okay, I really don't have anything for you guys today. I have SOME things I could post, but not really the time tonight to fully explain them. So...enjoy this hastily-scrawled vector turtle thingum I found sitting in my "Doodles" folder.

Sunday, January 3, 2010

Tilepalooza



Large version here.

I'm really not sure what to DO with this yet, but I felt I'd share it anyhow. Seems like it's not a bad idea to try and keep posting a Flash working every day or two. Any ideas anybody? It almost seems like a nice start to a puzzle game or a fun little password system.