Whilst working on my current video project, I came across a need to display the current time code. Expressions are the answer, of course, so I came up with this.
txt = "";
frames = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
f = frames % 30;
s = Math.floor(frames / 30);
m = Math.floor(s / 60) % 60; s %= 60;
h = Math.floor(m / 60);
if (f < 10) f = "0" + f;
if (s < 10) s = "0" + s;
if (m < 10) m = "0" + m;
if (h < 10) h = "0" + h;
txt = h + ":" + m + ":" + s + ";" + f;
txt
Simply attach this expression to the Source Text property of a text layer and viola!
For the past month I've been tinkering with Flex and my little Linux server. One of the projects that grew out of this was a web media player with which I could listen to all my tunes wherever there happened to be some scraps of internet. This has been one of the coolest projects I've worked on in some time. It successfully blends nearly all of my programming skills: PHP/MySQL, Javascript, XML, Flex/Actionscript 3.0, and some C++. I'm going to write a series of tutorials walking through what I've done in hopes of bringing this coolness to the masses. I'm going to be fairly verbose covering subjects that any seasoned programmer can pretty much skip over. In the first installment I'm going to cover creating the database and getting song information from the MP3s.
Continue reading Building a Web-based Media Player - Part 1
It is the eve of the beginning of my PHP/MySQL class. Of course, we should all know by now that CMS programming is child's play for me. However, seeing as my final project for this class is a CMS with front end, I'm taking this opportunity to redesign stuff, and by stuff I mean everthing (even beyond the site itself). Some things to expect from the next iteration:
If my rebrand goes as well as I hope, I shouldn't be updating the design for some time. Geez, we haven't heard that before, have we?
They say all good things must come to an end. Such is true for my one week of summer vacation. It was brief, yet enjoyable. Got to celebrate my birthday with my family, eat grilled food and lots of potato salad, and also take the usual trip to Tulsa. It's a pity that it was so short, but I'm complaining too much. The school is giving me a bachelor's degree in less than two years, so this time next year I'll be out of school. But that's a story for another day.
As you may recall, last month began my two month long journey through the wonders of Flash. Last month focused primarily on Flash as it pertains to design, teaching us the interface, motion tweens, and just a hint of ActionScript. This month, however, is dedicated to nothing but ActionScript. To demonstrate these "newly acquired skills" our final project consists of making a game.
Now, I put "newly acquired" in quotes for a reason. For anybody who's frequented this blog long enough you should know by now that I am, or at least used to be, heavy into coding. Because of this I have an unfair advantage over the rest of the class in this regard and as such I am taking my project to ridiculous extents (far above the scope of the course). The nice thing, though, is that the instructor actually acknowledges the fact that I am as proficient as I am, so much so that I took the place of the lab instructor for one day (whilst the real one was waiting in line for his iPhone 3G). Being able to talk to the instructor about geeky stuff as equals is a nice departure. But, enough ego stroking, about the actual project itself.
I chose to challenge myself and create essentially a dumbed down clone of Street Fighter, but be completely extensible through external configuration files. The first thing I avoided was the use of graphics inside Flash itself opting instead to load sprite sheets from external sources. Everything is configured through XML sheets that define how a character should react, define where animations are within a sprite sheet, stages, etc. Amazingly, I've achieved most of this and all very, very quickly. The biggest problem I foresee is the addition of enemy AI, but I've got ideas on how to achieve this as well. Overall, though, I'm loving being back at the helm of the coding ship. I'd forgotten how much of a thrill can be derived from hours of typing if statements and nested for loops. Damn, it's good to be back.
Once again people have thought it fun to spam my blog. To this I say: Burn in hell, you dirty bastards! But, oh well. I've added some interesting features to the comment system that should keep them at bay... unless they actually write a bot to target my site specifically. But, in the meantime, the comments are back up and running. No crazy password, approval e-mail, or word verification necessary. That's how proud I am of my coding. That and the fact that I can't seem to programtically send e-mails on my server. It sucks. Hardcore.
Also, you'll notice that the RSS feed is back so subscribe and never miss out on my awesome news again. Peace out!