Follow mclelun on Twitter +deviantWatch mclelun +fan mclelun RSS Feed
mclelun
Design + Programming = Multitask
blog
Refactoring Lost

lost

I didn’t go to office today and I was staying at home to have some rest. But I don’t really like to spend my whole day by just sleeping and did nothing. So, I dig up an old Flash project that I had long neglected and continue to work on it.

This Flash project is actually a conversion of my “Lost” Flash from AS2 to AS3. Originally, the AS2 “Lost” Flash was based on a wallpaper design that I did for an art event during 2007. One of my friends saw the wallpaper design and told me that the idea could be implement into a simple website. So, I took up the challenge and make it into a simple yet interesting website (at least in my opinion).

Not long after I complete the AS2 version of this Flash, I go through the scripting again and saw how ugly the script was. Although the ugly code is not “visible” to the end user/visitors of my site, but the extensibility is very bad. It was quite hard to add in new features later on.

Being a person that obsessed with “clean” code, I start refactoring the code during 2008. Half way through the process, I realize I might as well completely re-write the script in AS3 OOP. But my AS3 OOP was quite bad back then, so the progress is snail pace and the project got stuck after a while.

Time flies and today is 2010. I finally finish converting this damn thing from AS2 to AS3 after sitting in front of my PC one whole day. Most of the half baked script had been dump and re-written. I also manage to add in a few new features along the way.

Multiple Objects

The AS2 version was just one single character. But now I could spawn multiple objects into this “Lost” Flash by just changing a parameter, thanks to good use of OOP object class. I could even take this class file and reuse it in another project. I never understand that OOP “reusability until recently. That’s the problem with the education system here, the lecturer ask you memorize “The benefits of OOP programming”, instead of teaching you how to code in OOP.

lost wallpaper

Updated Guestbook

I also manage to update the guestbook system. Visitor can now make star constellation when they leave their comments.

lost wallpaper

Visit this page to view the updated version and sign my guestbook. I hope there is no serious bug in this version. =)

Download

View the Flash!
Lost Wallpaper 1 Deviant page
Lost Wallpaper 2 Deviant page

spamthis
twitter facebook delicious stumbleupon technorati digg


No good spam feed to “Refactoring Lost”

Leave a Good Spam

spam box
recent visitors
minifanfan



logo Copyright © 2010 mclelun.
Valid XHTML. Subscribe RSS rss.
spam eaten
293 spam!