My favorite mechanism for embedding SWFs, hands down, is Geoff Stearns’ SWFObject. It’s clean, lightweight, and easy to use. Since April 2006, SWFObject has been my first choice for working around the “click to activate and use this control” warning in Internet Explorer. Microsoft has decided to remove this activation behavior from Internet Explorer in April 2008 — right around the corner, as of this writing — but there’s still plenty of reason to keep right on using SWFObject. Why? Because it provides an elegant way to detect what version of Flash Player (if any) a website visitor has installed. If you’re using the On2 video codec, for example, it means your site requires Flash Player 8 or higher. With SWFObject, you can detect if your visitor has at least 8 and then display the SWF; otherwise, display a stand-in message (or image), such as “This site requires Flash Player 8 or higher.” But what if you want to redirect to another page instead? Or what if you want to display two different SWFs, depending on what’s installed? Read on. Keep reading »
Archive for the 'Web Development' Category
Here’s a handy URL. If you’ve ever asked yourself the above question — I sure have — the following site provides a useful breakdown.
By default, Active Content is written directly to the screen, which means it appears on top of other HTML content, regardless of its
z-index stacking order, as defined by CSS. This includes Flash, QuickTime, Windows Media, Java applets, and basically any other file that requires a plug-in in order to be displayed in a browser.
One of the most popular questions in regard to this issue is some variation on the following: “Flash is showing through my drop-down navigation! How can I keep this from happening?” The answer is provided on Adobe’s website in TechNote #15523. This TechNote has been available since December 2002, when it was written under the auspices of Macromedia. Unfortunately, it has been factually incorrect from the very beginning — not fatally flawed, but certainly misleading.
Update! Adobe revised this TechNote! Not sure when, exactly, but obviously some time between the original date of this blog entry (07/18/2006) and today (11/29/2006). Keep reading »
It’s often desirable to quickly resize the browser to a given set of dimensions: 800×600, 1024×768, or maybe, “Hey, how would this look on a widescreen laptop?” (1280×800). Granted, HTML design shouldn’t be too dependent on browser dimensions — after all, we live in a world of cell phone, PDA, and PSP browsers — and even on “normal” computer screens, many browsers are skinnable, so who knows how much area the viewport actually gets? Regardless, it is darned convenient to be able to snap the browser quickly to whatever size you like, even if you’re only doing it to make tutorial screenshots. The following three approaches are my favorite. Keep reading »
There are quite a few ways to describe color to a computer. Each of them is based on a particular mathematical model, usually called a color space. Off the top of my head, I can think of RGB, HSV, CMYK, and L*a*b*, but there are plenty more, depending on the desired output (monitor, television, paper, etc.).
Until I understood hexadecimal notation, I thought “hex values” in HTML and CSS were simply another color space — one I found hard to read — but it turns out that hex is actually just RGB. Seems preposterous, I know … until you see the connection. So, how does something like
#193A0B (a very dark green) relate to its decimal equivalent
rgb(25, 58, 11)? Let’s take a look. Keep reading »
Under certain circumstances, SWFs in Firefox display at the wrong size (usually too small) when their width and height attributes are set to a percent in HTML. There’s nothing wrong with using percents for width and height — as you’ve likely seen, “full screen” SWFs are a popular practice — but there is a wrong way to code for it. If you’ve run into this scenario, you’ll be happy to hear the solution is simple. This is neither a bug in Flash nor Firefox, as a matter of fact, and is resolved with a better understanding of HTML. Keep reading »