Archive for the ‘ActionScript 3.0’ Category

Particle Play With Perlin Noise

Sunday, April 26th, 2009

You need Flash 9 to see this awesome Perlin noise particle system!

This is an early iteration of the system but I think it’s at a good point to publish. I just saw Mario Klingerman present at the FITC, and now I have a ton of new ideas to continue exploring and experimenting. If only I had some more free time.

Eventually I plan to release the code, but not until I’ve explored the possibility a little further.

To bracket or not to bracket, making sense of single line conditionals

Thursday, March 19th, 2009

It’s taking me about 3 months to finally come up with a strong opinion about single line conditionals, but I now have a firm position:

“In the long run, it’s a bad idea to drop the brackets and put a conditional or iterator on a single line.”

Essentially sort of thing:

public function testResults(score:Number):void
{
    if(score < MIN_PASS) sendNotification(YOU_FAIL)
    else sendNotification(YOU_PASS)
}

Should always be this:

public function testResults(score:Number):void
{
    if(value < MIN_PASS)
    {
        sendNotification(YOU_FAIL)
    }
    else
    {
        sendNotification(YOU_PASS)
    }
}

Even when writing in a language that doesn’t use brackets, i.e. so called pure block languages like Python and Visual Basic, proper formatting should be used rather than single lines. If a language does use brackets, there is no excuse not to use them.

My argument follows this logic:

“Since debugging code is 20 times harder than writing it, by that definition you won’t be smart enough to find errors in clever code.”

(more…)

Olympic Widget for the CBC

Friday, August 8th, 2008

With Indusblue, I wrote a program to gather, read, translate and write results for the Olympic on CBC. I used PHP to handle the hardcore data on the server (30,000+ file, 306 events… etc), but used a ActionScript 3 to create a library so our front end developer could integrate it into the chrome.

Check it out below. You can get your own, and embed it into your site at CBC. Or just check out the “get and share” button on the widget.

MSN Autos & Mitsubishi: Contest Micro Site

Sunday, February 17th, 2008

About three weeks ago Indusblue launched a new contest site for MSN Autos. This was actually the first project with my new employer, and a doozy at that. I was the principle programmer, and there was no mercy spared as I was even forced to roll back the clock and program this is in the dreaded AS2.

Well, it was baptism by fire, but the whole experience was well worth it. The site is getting incredible traffic, (projected at over 500,000 before contest end in early March), and it really forced me to stretch my programming muscles to achieve some of the insane effects demanded by the art directors and designers.

msnautos.jpg

(more…)

Internal Build Error: Flash -> SWC + Flex = BitmapData Insanity

Saturday, February 16th, 2008

I thought I would present a problem I seem to be having consistently in Flex builder, and see if anyone is searching for like issues.

For some reason, Flex Builder is not handling Bitmap Data with any sort of consistency when it is included as a class in a SWC exported from Flash. In my opinion, using SWCs to import visual content from the Flash IDE, is for the most part a fluid and excellent work flow. However, every once in a while, in seemingly inexplicable fashion, I get internal build errors.

(more…)

Champagne Valentine Launched !!!

Saturday, November 24th, 2007

Champagne Valentine

Ok, so I’m totally stoked about launching Champagne Valentine’s new site. It was about a month’s worth of spare time development, but I think the end result is class A. Which is important as Champagne Valentine is run by some of the most original and unique people on the web.

At this point there are still some minor bugs to work out, but I’m really loving what’s going on here. Everything was programmed from scratch using an Object Oriented Architecture in ActionScript 3.0. I refused to use any components, and most of the content is run on separate XML and HTML files.

In the near future I have plan to add some more functionality and to create a content management system. This will likely be done in PHP, but I may get adventurous and skin it with flash!

So if you have a second, why don’t you go over and visit the folks at Champagne Valentine and drop them some comments on the site.

Globally set your tweens man!

Friday, November 23rd, 2007

Vicious Worms

Lately I’ve been using the Tween class included in the flash ActionScript 3.0 for Flash CS3 library, and I noticed some peculiar behavior with respect to the motion of the Tweens. Often, especially when the program was undergoing points of extreme activity, my tweens would not complete their motions. It was perplexing, and my first attempt to fix the bug was to simply to listen for the tween to stop

(tween.addListener(TweenEvent.MOTION_FINISH,
                   fixPosition)

, and then to force the asset to its intended end point. This worked on a simple application: Selected Works Site, but it completely failed when I tried it on one with heavy processor activity.

So, after trawling the internet in search of others experiencing the same problem, I believe I found the solution in the comments at a blog called Everything Cool. (I aslo found they talked about it on the live docs). Here I’ll explain what the problem is, how to solve it, and at the same time show you how to use the fl.transitions.Tween class in Flash CS3.

(more…)

Accessors and Mutators

Saturday, August 25th, 2007

mutator thumb**Warning: The following post is about Object Oriented Design, and may be VERY annoying for those who don’t spend a STUPID amount of time in front of the computer reading the driest material ever known to mankind. **

For those into OOD/OOP, please read on… This is my attempt to make lucid some very spiraling concepts. I’m no expert, I’m a budding programmer, so as such I may be able to present these ideas with a new perception. At any rate… getting them down on paper solidifies the methods in my mind. That’s why I’m sparse on code, and big on concept. So if I get anything wrong, feel free to send evocative comments, I love the sweet vigor of a verbal joust.

Note: All OOD jargon has been italicized and colored for no good reason at all.

(more…)