Here.
Interviewed: Second Skin Producer Victor Piñeiro
There are a lot of interesting movies premiering at SXSW this year, including Second Skin, a documentary look at the lives of seven MMORPG (Massively Multiplayer Online Role Playing Games) players. The trailer looks pretty great–though, admittedly, I’ve logged a lot of hours playing console games like Final Fantasy, so maybe it won’t be so interesting to someone who doesn’t care about video games.
In any event, I recently interviewed the film’s producer, Victor Piñeiro, for Austinist, and he’s a super cool guy. If all goes well, I’ll have a bunch more SXSW filmmaker interviews in the coming weeks.
UPDATE: The Second Skin guys arrived in Austin this week to do some promotion, and they’re posting video blogs of their SXSW experience on their youtube page.
Smart Vertical Centering Using CSS and Javascript
I’ve been up for a while now wrestling with a seemingly simple problem–how do you vertically center a fixed-size DIV without allowing it to crawl off the top of the page? And it turns out that the solution was much simpler than I expected, so I initially looked right past it. It includes some JavaScript though, so it’s not right for everyone.
Here’s the setup: I have a fixed-size div containing a flash movie. I want this flash movie to appear perfectly centered most of the time (easily done using some simple CSS), but I also want it to respect the top of the page, so if a client’s window is shrunk below the height of the movie, the top doesn’t appear “cut off”.
The first step was to do the centering. Let’s say my div, called “content_container”, is 900px by 675px. This CSS will center it both horizontally and vertically:
#content_container {
position:absolute;
width:900px;
left:50%;
top:50%;
margin:-337px 0 0 -450px;
}
Works! Unless, of course, the browser window is less than 675px high, in which case the div (while technically still centered) shifts off the top of the page. This is the issue.
My first instinct was to use Javascript to grab the coordinates of the div and make sure the top was at least zero. If it wasn’t, I’d set it to zero. And while that worked well for keeping the top from sliding off the page, it introduced a logic issue: once I set the top to zero, a test for “less than or equal to zero” is useless, and the div is stuck in one position. In other words, even if the user resizes their browser to an acceptable size, once the script fires the div will be stuck at the top.
After tinkering with it for like an hour, I realized that I’ve been taking the wrong approach. I don’t need to know the div’s position at all. All I need to know is whether or not the window is at least 675px high. If it’s not, I set the top to 337px (which, counting the negative margin, puts it at zero). If it is, I reset the top to 50%, and we have our centering back.
So first, I figure out the height of the window (adapted from this handy bit of code, which is pretty browser-friendly all the way back to IE4):
function getWinHeight() {
var myHeight = 0;
if( typeof( window.innerWidth ) == ‘number’ ) {
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
myHeight = document.body.clientHeight;
}
return (myHeight);
}
Now I check this height against our div’s height, which is 675px. If it’s less than that, I reset the top to zero. Otherwise, I make sure the top is 50%:
function fixPos() {
var thisTime = getWinHeight();
myDiv=document.getElementById(‘content_container’);
if (thisTime < 675) {
myDiv.style.top = "337px";
} else {
myDiv.style.top = "50%";
}
}
I call this fixPos() function from both the onLoad and onResize events. And while using the onResize event can make things a bit twitchy (especially in Firefox), it totally works. Of course, folks with JavaScript turned off will have to settle for the non-corrected position.
If anybody has another, cleaner way to vertically center a fixed-size div, gimme an email. I’d be totally interested to see it.
Netflix plugin breaks my validation
So just as I was buying champagne for my validation party, Albert Banks’s Netflix plugin for WordPress broke my website. Well, not really–it just introduced a small, annoying error that I’ll have to fix somehow: any “&” symbols that are rendered through the plugin (for example, the one in Romance & Cigarettes, which I have at home right now) don’t get converted to the correct character entity.
XHTML 1.0 assumes that every instance of the “&” symbol is the beginning of a charcter entity, and it gets cranky when it’s not followed by a valid reference and a semicolon (like this: &) . Even in alt tags and URL strings.
Not a big deal, really. And it’s something I might not have even noticed if I hadn’t had that particular movie at home right now. Some quick PHP changes should fix ‘er up.
Dischord to Offer Digital Sales
Dischord records announced yesterday that they’ll be launching a new digital sales initiative sometime this spring. Though you can already buy most of the Dischord catalog through e-music, itunes and amazon, the label is apparently crafting a web-based version of their completely awesome direct-to-consumer mail order business (if you look on the back of any Dischord CD, it’ll say something like, “This CD available $10 postage paid from Dischord Records”).
Says the Dischord newsletter: “Our goal is to offer a hybrid of the direct sale and subscription based services. We will offer customers the option to purchase entire album files for a set price or purchase credits [that] can be used to download a variety of individual songs.”
Awesome. And I assume the prices will be slightly lower than the average download, because that’s how Dischord rolls.
Finally, a label that understands the power of the internet as a distribution method. Why can’t the multi-billion dollar majors figure this stuff out? Grab that long tail, Dischord! Grab it!
Starbucks Finally Gets Free Wireless. Sort Of.
According to this New York Times article, AT&T will be offering free wireless internet at most Starbucks stores beginning this spring. I’ve long hated T-Mobile (Starbucks’ longtime, money-gouging internet partner), and I’ve wondered why anyone would hang out at a Starbucks when so many mom and pop cafes offer free internet access. This must have been frustrating for Starbucks as well–especially in a city like Austin, where virtually every type of business, including movie theatres and bookstores, offer free wifi.
There is a small catch though–only customers who use a Starbucks purchase card will get free time. The rest will have to pay $4 for every two hours of use, or $20 per month (which will also grant access to the nationwide network of non-Starbucks AT&T hotspots). But compared to T-Mobile’s pricing, that’s not bad at all. They charged as much as $40 per month, $10 per day, or $6 per hour for internet use.
In emergencies, I’ve sometimes grudgingly paid for the $10 day pass, but I’ve rarely spent more than an hour online at Starbucks. So a cheaper, two-hour plan seems much more reasonable to me.
Embedding Flash Files Without Breaking Validation
Today I finally ran this new site through the W3C validator, and found that I had all kinds of red exclamation points. Some of the errors were simple oversights on my part, but most of them revolved around my header, which is an embedded flash movie.
Ever since IE7 sent web developers into a panic by breaking the object and embed tags (then fixing them again), I’ve been using Macromedia’s AC_RunActiveContent.js to render flash movies. The problem is, the script writes unnecessarily ugly code that doesn’t validate as XHTML 1.0 Transitional, so it kind of makes me look like a chump.
While searching for a solution today, I found Drew Mclellan’s brilliantly simple, five-year-old Flash Satay method, which works really well for my purposes (a small flash movie that doesn’t need to stream). To accommodate IE7 users who haven’t updated their browsers yet, I wrote my own very simple JS function that doc.writes the necessary object tag. It looks like this:
function make_flash(swfPath, swfWidth, swfHeight)
{
var str = ‘<object type=”application/x-shockwave-flash”‘;
str += ‘data=”‘ + swfPath + ‘”‘;
str += ‘width=”‘ + swfWidth + ‘” height=”‘ + swfHeight + ‘”>’;
str += ‘<param name=”movie” value=”‘ + swfPath + ‘” />’;
str += ‘<param name=”allowScriptAccess” value=”always” />’;
str += ‘</object>’;
document.write(str);
}
Much, much simpler (but, admittedly, less flexible) than the Macromedia code. In the spirit of thoroughness, I also created a straight HTML version of the header for users with Javascript turned off.
I also learned another strange lesson while trying to get this seemingly simple flash header to work: if the user visits you at, say, http://angryrobots.com, but the link in your flash movie points literally to http://www.angryrobots.com, flash will see this as a cross-domain transaction, and won’t execute the getURL command. It doesn’t throw an error either–it simply doesn’t work. This is an issue for me, because I have two domains pointing at this site, and I can’t control whether or not users will type in the "www". So to combat this weird behavior, I had to throw in the "allowScriptAccess" parameter with a value set to "always". Lesson learned for next time, I guess.
Anyway… if you have another simple, flexible, standards-compliant method of embedding flash movies, please shoot me an email. I’d love to hear it.
A History of Piracy or Copyright in the Internet Age
Here is a long but fantastic lecture about the history and future of copyright, delivered by Richard Stallman, the father of the free software movement.
Stallman talks about the origins of copyright law, and describes how our idea of content ownership has changed over the past few hundred years. He also picks apart current copyright laws (including the bullshit DMCA), and sets out an alternative system in the context of modern production and distribution systems (you know, the internet?). If you like the lecture, also be sure to check out Lawrence Lessig’s Free Culture, a book that’ll change the way you look at “ownership” (and that you can download for free in PDF format).
The Stallman file is huge, and the video is completely unnecessary (I’d actually recommend not watching the video–Stallman isn’t the most, er, elegant speaker), but if you’re at all interested in copyright, it’s worth the wait. You’ll also need software that plays .ogg files, but that’s easy–Miro (formerly known as “Democracy”) will open ’em no prob.
[Download the Lecture]
[Download the Miro Player]
[Download Free Culture]
Stream Summercamp! For Free
I’ve been wanting to see Bradley Beesley and Sarah Price’s 2006 documentary Summercamp! for a while now. Price is one of the directors behind American Movie, which is easily one of my favorite documentaries (if not plain old movies) ever. So I was happy to find out that you can stream Summercamp! in its entirety through AOL’s “True Stories” website. For free. The quality isn’t brilliant, and it awkwardly inserts an ad every fifteen minutes, but it’s a fun watch anyway.
Summercamp! is a shiny little gem of a movie–pretty much everything I expected it to be. The film follows a group of kids aged five to sixteen as they attend Swift Nature Camp, a summer getaway (for both the kids and the parents, I’m sure) located in the lush greenery of Northwestern Wisconsin. It’s a fairly straightforward portrait of camp life, without any major ups or downs–but the kids are funny and brilliant and heartbreaking in the way that only kids can be. And for better or worse it’ll transport you back to that glorious time of life when all was possibility.
[Watch Summercamp!]
[Summercamp! Website]
You Know What I Really Need? Another Social Networking Tool.
Inspired by this fantastic list of every book Art Garfunkel has ever read (via Dave, like 6 months ago), I’ve been looking for a web-based tool to help document my movie watching. You know–keep track of titles, a star rating, maybe even a short review if I have something coherent to say.
Unfortunately, in the age of Myspace, I’m hardpressed to find any useful services that don’t require you to become part of some bullshit “community” while using them. Don’t get me wrong, I think the idea of a web-based social network is brilliant; I just don’t see why the world needs any more of them. Myspace is good. Facebook is even better. So why do I need a whole new set of relationships–of friends, neighbors, messages, comments, photo albums and blogs? I don’t want to have to log into Last.fm for my “music friends”, Flixster for my “movie friends” and LibraryThing for my “book friends”–I want specialized services that integrate with the social networks that I already have in place. And I want to be able to pick up my info and move it to another framework if I feel like it (a feature that’s rare in web apps or services).
Though I think Flixster.com is an ugly piece if junk, I have to applaud them for integrating with Facebook. I never visit Flixster’s actual site, I just use the Facebook plugin to keep track of the movies I watch, and to share info with folks I’m already “friends” with. I’m not forced to start from scratch, make a cute “profile” or join various groups; that’s what Facebook is for.
But I’m still confused as to why neither Flixster nor Spout.com have fully integrated with Netflix yet. Netflix.com offers my “queue”, my “movies at home” and my “recent rental activity” as feeds, so it’d be REALLY easy to line these movies up on my homepage for review (Spout lets you “link” your Netflix queue, but I can’t for the life of me figure out where it actually appears in your profile or on the site). It seems like such an obvious idea, doesn’t it?
I guess my point is that despite their recent popularity, I think “niche” social networks are a sad, confused stab at imitating Myspace’s financial success, and in a couple years there’ll be so many “niches” that the pendulum will swing toward consolidation–one or two popular social utility frameworks with a set of specialized plugins. And the companies that drop the “community” garbage in favor of useful features will come out on top.