16.4. Embedding Flash in an ASP.NET Page

Flash is a hugely popular format for presenting animation and videos on a screen, especially with browser plug-ins. Web sites like YouTube.com use Flash extensively because the download size is reasonable, and almost every browser has the technology or can get it. (You sometimes hear geeks referring to a Flash file as a swiff, a name derived from the Flash extension, .swf).

16.4.1. Downloading and installing Flasher

Technically, you don't need ASP.NET to display Flash content on a page because the basic requirement is an HTML <object> tag with a bunch of configuration parameters. However, getting all the settings correct is finicky and error-prone. It's far easier to use an ASP.NET component, such as the excellent Flasher freebie control from my MVP colleague Steve Orr.

Flasher not only handles the configuration, it also adjusts the settings for the best experience based on the browser type. Follow these steps to download and install the Flasher component:

  1. Download the free Flasher control from www.steveorr.net/articles/Flasher.aspx.

  2. Extract the Flasher.dll assembly from the download into a temporary folder.

  3. Using Windows Explorer, drag Flasher.dll and drop it into the bin folder in Solution Explorer. (Create a bin folder if you don't have one.)

  4. Still using Windows Explorer, drag Flasher.dll and drop it on the Toolbox in the General tab.

16.4.2. Using the Flasher control on a page

You use the Flasher control like other ASP.NET controls by ...

Get ASP.NET 3.5 For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.