jump to navigation

Set movieclip default properties in flash June 26, 2008

Posted by sdpurtill in : Flash, ActionScript , add a comment

I had to write a function to reset any movieclip in Flash. It’s very simple — you have an array with all the default properties you want to have in the reset. Then you pass any movieclip to the setDefaultProperties function to set the defaults. Now whenever you want to reset the movieclip, just pass it as the first parameter to resetMovieClip.

Done.


var aDefaultProps:Array = new Array('_width', '_height', '_x', '_y', '_alpha');


function setDefaultProperties(mMovieClip:MovieClip):Void {
  for(sProperty in aDefaultProps) {
    mMovieClip['default' + aDefaultProps[sProperty]] = mMovieClip[aDefaultProps[sProperty]];
  }
}


function resetMovieClip(mMovieClip:MovieClip):Void {
  for(sProperty in mMovieClip) {
    if (sProperty.substr(0, 8) == 'default_') {
      mMovieClip[sProperty.substr(7)] = mMovieClip[sProperty];
    }
  }
}

Obama Will Win June 25, 2008

Posted by sdpurtill in : Politics, Money , 8comments

This post is more about media control than who I support in the upcoming election. I will be voting for McCain since he’s not going to rape the rich but dislike both candidates equally (sorry grandpa).

You can’t put a price on the power to control people. Look at history up until the last few decades - the ability to influence a large group of people was very limited due to the distribution constraints. The most widespread form of media prior to TV was the newspaper. If you controlled the papers, you could have your way in that region. Then came the TV and with it a larger market to penetrate. Then came the media conglomerates who bought up networks, newspapers, magazines, and of course, MySpace. Which brings us to today where we have Sumner Redstone and Rupert Murdoch at the healm of two of the most influential media companies that have ever existed. News Corp alone has a media reach of over 4.2 billion people - yes, that was a “B”. (wikipedia this if you think I’m lying)

I’m sure everyone is familiar with the political bias the networks have - CBS, NBC, ABC are all extremely liberal. The only right wing network is FOX, which is on the extreme neo-con end of right wing (makes conservatives look like idiots). The big story this election that hasn’t got nearly enough coverage is Rupert Murdoch and who he is supporting. The man that owns the only right wing network, a flurry of newspapers and - yes this will be important - MySpace.

I’ve been following Rupert Murdoch in this upcoming election since I think he is the only media mogul that matters in the US. He controls what FOX News gets to say, and since it is the only right wing network out there, whoever Murdoch puts his weight behind is going to get a good 50% of the vote. A few weeks ago, he threw his weight behind Obama with a New York Post article about him. The NY Post is a trashy publication, but when asked if he had influenced the editors to put Obama on it at the D6 Conference Murdoch said “yes” without even flinching. Now I’m not sure if this was meant to be a joke or of Murdoch is actually supporting Obama in the upcoming election.

It got me thinking. Murdoch has backed the Republican party for the last century (the guy’s old), what would make him switch right now? It could be very simple. Did McCain block a business deal that Murdoch tried to do in the past? Did McCain go after Murdoch for something he did in the past? It could be complicated to (I wouldn’t know where to start). Maybe Murdoch and Obama have an agreement if Obama becomes the next president (Obama passes some exceptions to anti-trust laws?). Whatever it was, I’m sure if Murdoch decides to back Obama it will have to do with something McCain did to Murdoch in the past.

No matter what you think about FOX news, it does have a lot of influence over conservatives since it is the only station they can turn to where they aren’t constantly maligning President Bush and the Republican party. I know everyone thinks they’re so smart and have the power to form their own opinions, but we’re talking about middle America here. This isn’t San Francisco or New York City that McCain needs (he’ll lose them anyways), it’s the states that always vote Republican but could flip this year if News Corp. decides to put it’s money on Obama.

In the coming weeks we’ll see who Murdoch ends up supporting, but if he decides to back Obama, a win for John McCain will be impossible. I will say this once:

Whoever Rupert Murdoch backs for the 2008 presidency will win.

Explosive productivity June 18, 2008

Posted by sdpurtill in : Life, Advice , 4comments

I think I have a condition of sorts. In the last few months I’ve noticed that I am either really motivated and get a lot of stuff done, or have no motivation at all and am useless. I see it now more than ever because one of the guys I work with is really consistent with how he gets work done. I like to think of my condition as “explosive productivity”.

Take the following example:

I try to consistently do a weekly review on Sunday night or Monday morning and write a todo list for everything that needs to be accomplished in the upcoming week. The weeks that where I do these weekly reviews I always cross everything off the list and have extremely productive weeks. But there are weeks where I have no motivation to do a weekly review (it’s about 1 in 4 now, used to be 1 in 3 so I’m improving). In these weeks I have no direction and am generally pretty lazy about everything - work, communicating with people, even making my bed. I call these my recovery weeks where I realize I’m still 19 and not a machine (yet). They’re quite humbling.

I’ve noticed similar behavior in a lot of people that I’ve gotten to know in Silicon Valley. I feel like there is a perception about a lot of entrepreneurs that says you should be working 24/7 to make a startup successful, but everyone is wired differently. Myself? I can’t work for more than 4 weeks straight without having a “recovery week”. As time goes on I’ve been able to build up more and more stamina, but I have a hard time seeing myself becoming a machine. My logic behind this is as follows: If I can get done in 1 week what takes most people 2 weeks, I should have an explosive 3 weeks and then take a 1 week break to recover and get ready for the next 3. I am tossing the word “recover” around without defining it - by it I mean a week where you’re not at your productivity peak. Maybe you’re at 1/2 of your normal productivity. Whatever it is, this week should be spent planning what the next 3-4 weeks will be like.

I’ve read a lot of books on productivity. The best one I ever read was How To Get Things Done by David Allen. Halfway through the book I slipped a bookmark in it and threw it under my bed, never to pick it up again - kind of ironic. How to get things done eh? :) I’ve come to the sad conclusion that no matter how many productivity books I read, none of them are made specifically for me. They’re made for the “general public”. I think these books are similar to health diets — they last for a few months but aren’t sustainable in the long term for people with strong patterns (like myself).

I have applied methods that the books have taught here and there — one of my favorite is the 2 minute rule that David Allen talks about in his book. If you can get the task done within the next 2 minutes, just get it done and out of your system. Another one is writing everything down (I have a habit of sending myself emails via BlackBerry when I’m not around a computer). I’ve found that this takes a lot of my perceived stress away, because I know if I write something down I won’t forget it. Thinking that I forgot something is where a big part of my stress always coems from, so I’m glad I’ve solved that. But by and large none of these productivity books have boosted my productivity more than methods that I’ve found myself (the recovery week being my best example).

I hope that one day I will figure out how to work non stop for several months at a time - until then I’ll need my recovery weeks here and there.

What are some of the things that make you productive?

Making the switch to Apple June 12, 2008

Posted by sdpurtill in : Apple , 17comments

I finally sold out and bought a MacBook Pro the other day to see what all the hype was about. I am coming from three years of exclusively using IBM ThinkPads (well, Lenovo now). I haven’t used a tower computer since 10th grade so I think it’s safe to say that I’m going to be using laptops/tablets for the foreseeable future. Coming from a ThinkPad is hard — my ThinkPad crashed only once, when I accidentally deleted a hidden 13KB file in the root C directory that deemed the machine useless. I took it to the Geek Squad and they were able to fix it, which is cool cause those guys are completely useless. I’ve been using the MB Pro for the last two days, so here are my initial thoughts on it.

This review is really critical because I’m going through withdrawls from my ThinkPad.

The first thing I will bring up is the fact that this thing gets so hot I could make breakfast on top of it if I flipped it over. This is COMPLETELY unacceptable, I can’t believe the FCC (or whatever body governs products here in the US) let Apple release a computer that could get to the temperatures that mine has already gotten to in the last few days. It has gotten so hot that I can’t even type on the keyboard, which ruins my entire experience with the machine. I’ve talked to a few friends and they tell me to put it on a desk, so I’m trying that out now (was on my lap on top of the Lapinator before). My three year old ThinkPad still has a longer battery life and has never gotten half as hot. I also think it’s weird that this flaw didn’t get much bashing in the media, if a Windows laptop had the problem it would be all over the place. SO besides that rant, here is what I think about the rest of it. Probably the worst part, since I am already a pretty sweaty person, IT MAKES MY PALMS SWEAT. Up there on the annoying scale with babies crying on airplanes right before they land.

The computer is extremely fast, has slowed down in Photoshop editing some photos (I shoot in RAW). I have never cared much about speed because I don’t edit movies/audio, and I don’t mind waiting a few seconds for PS to render things. The hard drive is 250GB so I’ll probably have to get an external drive pretty soon - when are they going to have TB drives in laptops? Better be soon.

The mousepad on the MB Pro is a piece of CRAP, I’ll take the ThinkPad’s one any day. And it doesn’t have the little track ball that the ThinkPad had, I’m already missing that a ton. Also, the Apple mouses are the worst designed products I’ve EVER used. Sure they look nice, but coming from a Logitech mouse that is made for *human hands*, this thing is like using a horse vs a Lamborghini.

Ok. Take a deep breath. My positive review begins here.

The software. Easiest installations I’ve ever run through (literally, I ran through them). It takes a good 15 seconds to install anything (unless you’re installing Creative Suite). I love the dock at the bottom because I really only use 3-4 programs heavily, so I can bring those up any time. I am in love with WriteRoom, this software that lets you turn the screen black and gives you the entire screen to write. Really liberating.

AThe software runs so smoothly, it’s kind of weird. In Windows you’re used to things crashing every few hours, you kind of expect it. I become addicted to pressing CTRL+S (save shortcut) on everything I worked on in fear of a APPLICATION NOT RESPONDING error. Still haven’t hit that on this machine, and I’ve had a lot of apps open at once. Also really liberating.

Everything looks so much prettier. Aesthetically this whole experience is beautiful, and I’m sure that’s what Jobs set out to do with OSX. Job well done.

Overall this thing is awesome, very glad that I got it. This review does a lot more bashing than it should, but I promise you I really like this thing. But for the record: I’m not buying into the Apple hype at ALL. It’s just a computer at the end of the day, and someone is going to come along pretty soon and out-innovate Apple’s OS and all the fanboys will jump on that bus. Congratulations.

Conclusion: I can finally say I’m a Mac user, but will probably never say I’m a Fanboy.

P.S.: I still love you ThinkPad. No really, I’m still going to use you when I get tired of my fingers getting singed.

UPDATE: Thanks to Dustin Curtis, I was able to find smcFanControl 2.1.2 which allows me to set the minimum speed of the fans. Already works, so no problems with the heat anymore, yay!