Penguins, we're at 20% ground force operational status.

New Flash Game - Distro Slot

Date/Time Permalink: 07/03/07 07:48:27 pm
Category: Flash

Well, that was quite a bit of work...

After struggling with some new tasks in Actionscript, I have produced a fairly decent Flash slot machine game.

screenshot of Distro Slot Flash game

Yes, I used the logos from 7 well-known Linux distributions as the slot machine symbols. I hope this doesn't come back on me as one of those "seemed like a good idea at the time" type moments.

There's all kinds of hilarious jokes you could make with this idea. What if you set one of these up in real life, and it would pay out in install CDs? Or add a Windows symbol that takes away your credits and breaks the machine...

I included the source code tarball, GPL2ed, for anybody who's interested. This time the source code has two varieties: one plain and one with generous documentation included in comments, for those, like I, who are learning.

By the way, two milestones I've conquered here are playing sounds from Flash, and setting a timer. The timer was necessary to get the reels to animate for a while, then stop. Searching for tutorials on getting a timed event in Flash was frustrating; I finally found this site which explains it well. Between that and my example, hopefully the next person trying to figure out how to set a delayed timer event in Flash will have an easier go.

As for the sound, I'm probably not doing it right. The two sounds play too fast and choppy with too much of a delay. I don't know if it's what I'm doing, how my machine set-up is handling it, maybe the Flash plug-in on Firefox has this specific problem, or what? Any advice is welcome.

PS On the math side, it is disgustingly generous. I think the house percentage is something like -50%. I guess it's been a while since I figured odds...

Follow me on Twitter for an update every time this blog gets a post.
Stumble it Reddit this share on Facebook

suddenly the moon