Pretty Pleased with the SWFAddress Apache, mod_rewrite, and PHP SEO Implementation
The latest project I've been working on at Rokkan has been umbro.com. When the project first came to us there was quite a bit of discussion over what technology to use, specifically HTML vs. Flash. The client, naturally, was concerned about SEO but also wanted a nice "rich" experience. Sure, there's been a little bit of talk lately over the fact that Google can now index certain types of content with regards to SWF files and the files which they load, but its still sketchy at best. Not to mention you have to pay close attention to how you setup your text fields 'n such. Hell, when is the last time you searched on Google for something significant and got a result that takes you to a specific page of a Flash site/app? I honestly can't think of that every happening to me.
Just One of My Favorite Flash Tools: swffit
I just have to mention this really quickly. When working on tridentgum.com I was introduced to, what I thought might be, a little known JavaScript tool for Flash proejcts. We had to give the site a minimum height and width in the browser but still go 100% if the screen is larger than the minimum size. Something I've done before but just not so easily. At any rate, the lead developer at the other agency we were working with discovered swffit. It makes doing this sort of thing ridiculously easy. In most of my cases, I just need a minimum width and height, which is usually the width and height of my FLA's. Otherwise, the site can stretch to the size of the browser.
I recommend swffit to everyone!
SWFAddress 2.1 & SWFObject 2 Work Together.
I spent a good hour yesterday trying to get SWFAddress 2.1 and SWFObject 2 to work together. First off, they do work together. Second, there's nothing to it. Then why did it take me an hour? Because I'm a dummy and I had the order in which each JavaScript set was called. In hindsight, this is common sense, but the golden ticket here is calling SWFAddress javascript BEFORE declaring the SWFObject. This more applies to people using the dynamic way of embedding the SWFObject. ie:
<head>
<title>SWFObject v2.0 - step 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/swfaddress.js"></script>
<script type="text/javascript">
swfobject.embedSWF('website.swf', 'website', '100%', '100%', '9.0.45',
'swfobject/expressinstall.swf', {}, {bgcolor: '#CCCCCC', menu: 'false'}, {id: 'website'});
</script>
</head>
Silly right? I saw a couple of posts out there of people having a hard time getting this going. Once I flipped the JS declaration, it worked. And I felt kinda dumb. But hey ... That's life.
BTW: both SWFAddress and SWFObject 2 are pretty amazing and should be worked into your site/app flow if they aren't already.
Flash Embed Tip: Minimum width and height for liquid layouts
Update: This post is old, and getting a decent amount of traffic, so I've decided to provide a link to a more recent post that handles this situation much better! Just One of My Favorite Flash Tools: swffit
Over the course of your career you often come up with solutions to such small problems that you completely forget about them. One instance for me is coming with a really simple way to ensure that a Flash site has a minimum height and/or width while using a liquid layout. When a designer gives you a comp and he or she says "I want this to be 'fullscreen'", you immediately think that you'll be setting the width and height of the embed code to 100%. However, you soon realize that you have to account for smaller screen sizes than the size at which the site was designed for.
You could create you're own horizontal and vertical scrollbars within your Flash piece to handle such a situation, but I much prefer the scrollbars within the browser, as a user is much more apt to recognize them and feel more comfortable using them. Here is my tip for handling this.
Say you have a piece of Flash content embedded in your page with SWFObject as such:
var so = new SWFObject("Home.swf", "myFlashContent", "100%", "100%", "8", "#000000"); so.write("flashcontent");
Straightforward, of course. Now start by adding this Javascript function up within the page's HEAD tag:
function adjustSWFHeight() { if(document.body.clientHeight <= 768) document.getElementById("myFlashContent").style.height = "680px"; else document.getElementById("myFlashContent").style.height = "100%"; if(document.body.clientWidth <= 1000) document.getElementById("myFlashContent").style.width= "1000px"; else document.getElementById("myFlashContent").style.width= "100%"; }
Simple enough, right? The only thing you'll have to customize is the condition statement which defines the minimum height of the Flash content and the edge at which to use the minimum height over a 100% value. Next, set the onLoad and onResize properties of the page's BODY tag.
And thats it! o far it seems to work in Firefox, IE and Safari pretty well. Perhaps it will help you!
Not Bummed About AIR’s HTML Component: Javascript and Actionscript Integration
So I've had a change of heart. Big whoop! It happens to everyone at some point in there life. Its kind of like when your girlfriend starts to really get on your nerves but then out of no where she...oh nevermind, I think you know what I mean. At any rate, I've been working on an HTML/CSS editor program for the book and I have to say that the Javascript/Actionscript integration is simply amazing! Maybe I'm getting excited over nothing, but I can't begin to tell you how awesome it is to be able to loop through stylesheet and css related objects all inline with my actionscript. Sure, there's a few things you have to take into consideration, but it has allowed me to make this application in almost no time. I just have to brush up on my Javascript and bam! CSS editor! Needless to say, I'm stoked. Over and out.