This site is hosted on Squarespace, an awesome service that allows you to host blogs, galleries, and websites. They have great tools for managing the look and the content of your site. Even cooler, they provide hosting that can give you more resources if you suddenly need them. For example, if I'm caught up in some scandle and CNN's breaking story links to this post, well, it won't crash. They also have really nice analytics tools, so I could see how many gawkers are coming to nerdiguy.com.
However, since Squarespace is one company of a long list of companies that do NOT financially support this blog, I'm not going to spend much more time singing their praises.
What I want to write about is Squarespace 6. This update came out a couple weeks ago, and, as is typical for a major software change, I have mixed feelings. It looks really cool. The tools to manage the site are incredible. However, some of the features that were present on the old site seem to be missing, and it's a little buggy. As someone who had spent years working on updates to a website, only to have users lament the loss of the old version, I'm very sympathetic to them. And I have the utmost confidence that the bugs will be worked out and the old features will trickle back in.
A few things have perplexed me since converting to Squarespace 6. For example, it doesn't seem like I have a lot flexibility for editing the structure of the templates. Also, I can't find an easy way to provide my readers (either one of them) with an RSS feed.
I also was struggling to embed Flash files on the site. I know, I know, Flash is going the way of the dodo. Still, I'd spent a fair amount of time programming in Flash in the past and I want to include a few of my creations here. Actually, my Oculus Invaders game seems to be the biggest reason people come to nerdiguy.com.
I had to do a little finagling with Squarespace 5 to get these Flash files embeded and working. I used swfobject and Squarespace 5 code injection, using this forum post as a guide.
However, when I upgraded to Squarespace 6 I was at a loss. I'm still getting the hang of the new version, and I initially saw no access to a file system to even store my Flash files, much less link to them or embed them. I contacted their customer support about this, and, and after several back and forth emails, got the impression that it was not possible. I was starting to get very disappointed with the new version and was wondering if I wanted the shiny new look of the new one or what appeared to be the more robust and feature rich old one.
I kept plugging away, though, and eventually figured out that you can upload and link to files (I knew it - how could you not!?). To do this, simply go to the page or journal entry where you want to appear and enter the editing mode. Clicking the "link" icon in the toolbar will give you the option of uploading a file. Clicking this will allow you to navigate to the file(s) on your computer and upload it. Once the file is uploaded you the text field will display an absolute path to your file - you'll want to copy this. If you uploaded multiple items you can hover over the "upload file button" and see all of your files. Clicking a name will display that file's path.
There. Now all we have to do is embed it into our blog entry. As I said earlier, I wanted to use swfobject because in my experience this is the best way to embed Flash in a browser-independent way. Alas, I could not make this work, even with code injection. Instead, I took a simpler route. I created my blog post with a little text in the beginning. I then clicked the "Add Block" button to add a code block, then again to add some text at the end.
So essentially, the post is divided into three sections:
I added the standard object/embed Flash code in the code block and changed the language to Javascript. EDIT: Set the language to HTML, not Javascript.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="Yourfilename" ALIGN="">
<PARAM NAME="movie" VALUE="Yourfilename.swf">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="bgcolor" VALUE="#333399">
<EMBED src="Yourfilename.swf" quality="high" bgcolor="#333399" WIDTH="320" HEIGHT="240" NAME="Yourfilename" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
Just make sure you change the two instances of *Yourfilename.swf* to the link that you uploaded (the one I told you to copy earlier). Set the width and height and to whatever you need, and change the background color if you desire.
A couple more things. For some reason, every time you I tried to edit my code block the *display source* checkmark became checked. This is pretty annoying, because if you save it that way it will just display your code (instead of running it when the page loads).
EDIT: Again, the image above shows the language as Javascript: It should be set to HTML.
Lastly, when I was working on this my flash file was not working. It didn't work in the editor, and it didn't work in the preview. However, when I logged out and looked at my site, it worked! You can see the results here and here.
Nothing too complicated for a real website developer. However, with my disorientation with the new Squarespace site and the misinformation (perhaps *miscommunication* would be a fairer word) I received from their support, I was starting to think this would not be possible. Maybe posting my experience here will make the process easier for someone else.