fuzzyraygun

between here and there is better than either here or there

Archive for January, 2010

add leading zeros to a dynamic variable in Flash

Found a great utility to help with little chores like this in Flash.

http://casalib.org/ has made a nice Flash framework that you can use for AS 2.0 or 3.0 to do lots of stuff. Great DOCs section of the site as well that shows how each function works.

I used the NumberUtil.format function to add leading zeros to a variable that I was outputting to a text box and it was as easy as pie. Unpack the ZIP file that you can download from the site and put the “org” folder that is inside the code folder in the same directory as your Flash file (fla).

import that class at the head of your actionscript

import org.casalib.util.NumberUtil;

Next use this trace command as a guide on how the NumberUtil.format command works.

trace(NumberUtil.format(1234567, 8, ",")); // Traces 01,234,567

Mine worked something like this. I didn’t need the commas to separate the numbers I just needed the leading zeros. This turned my original number that was something like this 5045345 to this 005045345.

tf.text = NumberUtil.format(tf.text, 9);

No comments

Twitter

I find myself Twittering more and more as it is easier to throw little daily things than it is to fill a paragraph or two

check me out:
fuzzyraygun on twitter

No comments

The Pareto Principle

Every time I turn around I find some weird thing that comes back to this. 80/20. I’m wouldn’t be surprised if his and the golden ratio turn out to govern vast amounts of human growth and behavior.

Wiki article on Pareto Principle | Wiki Golden Radio

No comments

Winter Wait

Horsefeathers play from the stereo and I tend the stove
The high speed tum tum comes from your sewing machine as diapers are made
The whines for more potato snacks as the heat from the kitchen dissipates
The dryer hums, the heater whirs and the fire crackles
I love all of these sounds of our home
Each one in rhythm and time
At night the silence is deafening and brings fitful sleep until our bundle arrives
We are outlaws laying low so the heat can pass.
We know it never will.

No comments

Best / Most listened to records of 2009

This is a tough list because I could include lots of records that are not from 2009 that I listened to pretty regularly this year. I will try to keep this to just records that came out this year. Some made it to the list of the decade and others didn’t.

Neko Case – Middle Cyclone
Phoenix – Wolfgang Amadeus Phoenix
Fruit Bats – Ruminant Band
Built to Spill – There is no enemy
Wilco – The Album
Tegan Sara – Sainthood
Grizzly Bear – Veckatimest
M. Ward – Hold Time
Telekinesis – Telekinesis
Doves – Kingdom of Rust

No comments

Best albums – 2000-2009

I can’t really narrow down this list. There were such great records over the last ten years. Some bands have two records on this list because I just couldn’t decide between them. While I’m sure that there are lots of records that could be on this list, I don’t own them or haven’t heard of them. Don’t even know how I would keep this list to 20 like I originally wanted.

American Analog Set – Promise of Love
Trail of Dead – Source Tags and Code
Augie March – Moo you bloody Choir
Calexico – Feast of Wine
Fleet Foxes – Ragged Wood
Foxboro Hot tubs – Stop drop and Roll
Fruit Bats – Ruminant Band, Spelled in Bones
Helio Sequence – Keep your eyes Ahead
Jeremy Enigk – The missing Link
Kings of Leon – Only by the night
Liam Finn – I’ll be Lightning
Mgmt – Oracular Spectacular
Miracle Fortress – Five Roses
The National – Bxer
Neko Case – Fox Confessor
Sea Wolf – Leaves in the River
Arcade Fire – Funeral
At the Drive in – Relationship of Command
Band of Horses – Everything all the time
Beck – Guero
Bloc Party – Silent Alarm
Bon iver – For Emma forever ago
Broken Social Scene – You forgot it in people
Califone – Roots and Crowns
Cloud Cult – Advice from the Happy Hippo
Death Cab for Cutie – Plans
Death Cab for Cutie – Transatlanticism
Decemberists – Castaways and Cutouts
Decemberists – Her Majesty The Decemberists
Doves – Some Cities
Elliot Smith – Figure 8
French Kicks – Two Thousand
Gillian Welch – Time
The Glands – The Glands
Green Day – American Idiot
Guided By Voices – Isolation Drills
The Hold Steady – Boys and Girls in America
Interpol – Turn on the Bright Lights
Iron and Wine – Our endless Numbered Days
Jayhawks – Rainy Day music
Jets to Brazil – Perfecting Lonliness
M. Ward – Transfiguration of Vincent, Transistor Radio
My Morning Jacket – Z
Nada Surf – The Weight is the Gift, Proximity Effect
New Pornographers – Electric Version
Nick Lowe – The Convincer
Our Lady Peace – Spiritual Machines
Pinback – Summer in Abandon
The Postal Service – Give up
Queens of the Stoneage – Rated R
Roge Wave – Decending Like Vultures
Rosebuds – The RoseBuds Make out
Ryan Adams – Gold, Heartbreaker
Shins – Oh, inverted World, Chutes to Narrow
Snow Patrol – Final Straw
Soundtrack of our Lives – behind the Music
Silversun Pickups – Carnavas
Spoon – Kil the Moonlight
Working for a nuclear Free City
Steve Earle – Transcendental Blues
The Strokes – Is this it?
Superdrag – In the valley of dying stars
Tegan and Sara – So Jealous
Thievery Corp – the mirror conspiracy
Whiskeytown – Pneumonia
The Wrens – Meadowlands
Yeah Yeah Yeahs – Fever to Tell

No comments

The aughts

The aughts? Seems like a funny name for it, but I guess you can name it anything you like. It was the best decade so far. Is it really already over? I can’t wait for the next. The teens? OK bring it on.

Here is a short list of all the things I have done in the last decade.

  • Met my wife. (By far the best thing that has happened to me yet.)
  • Built a small web business that now has 9 employees
  • Went to New Zealand, Italy, England and France with my wife. Its amazing she gets me out of the house.
  • Built a music studio and made 3 records.
  • Snowboarded on a volcano (OK, it was dormant, but still its pretty cool.)
  • Got in a motorcycle accident and had my arm pieced back together with steel plates.
  • Got married
  • Moved to Portland.
  • Got a great dog
No comments