»
Developing Flash websites using progressive enhancement
Published 09/30/2006
Developing Flash websites using progressive enhancement
Although Adobe Flash Player is one of the most widely distributed web clients available, there is still a group of people who are hesitant to use Adobe Flash content. They often describe Flash as a wonderful tool that can make a real contribution to a website's audiovisual appeal and interactivity. But they also warn others not to overdo things because entire websites designed in Flash would both be opaque to search engines and lock out a certain group of potential visitors. In this article I explain that this doesn't necessarily have to be the case. It is merely a matter of execution of how a website is created. With some small extra effort, you can easily avoid these types of problems and create great Flash experiences that are optimized for search engine indexing and contain content that is accessible to the biggest target audience possible. Progressive Enhancement is a web development strategy that ensures that even a visitor with the lowest common denominator web browser technology can navigate through a website and read its content. It uses basic markup—or (X)HTML—as its foundation to keep both content and navigation accessible for everyone, even people using text browsers and simple mobile devices. It utilizes semantic markup to add meaning to this content, which is the basis for search engine–friendly content. The main philosophy behind progressive enhancement is that you enhance the "basic version" of your content with additional presentation or behavior by using technologies like CSS, JavaScript, and Flash. These should be served only when the required browser technology support is available. Progressive enhancement applied to a Flash project could look something like the following: - An HTML page that includes content that is optimized for web crawlers and low-tech browsers
- Style sheets to professionally lay out and style this basic version, aimed at visitors that use CSS-enabled browsers but don't have the required Flash plug-in
- JavaScript to add behavior and improve the usability of the basic version—again aimed at visitors who don't have the appropriate Flash support
- Flash content aimed at the biggest part of the target audience, for the full-blown user experience
Here's why you should use this approach: because its benefits often outweigh its cost. Search engine–friendly content enables good rankings on search engines, while accessible content locks no one out and avoids blank home pages or page sections. These topics are likely to be of high importance to some of your clients. At Refunk we have included progressive enhancement in our standard offering because we see it as a small, extra effort—but a worthwhile one—to do things the right way. We think it is an approach worthy of investing in for any design studio specializing in Flash content. To complete this tutorial you will need to install the following software and files: Flash Professional 8 Dreamweaver 8 (or any code editor) Sample files: Prerequisite Knowledge A basic knowledge of Flash, (X)HTML, CSS, and JavaScript is assumed.
|
»
Embedding Flash Video into a Web Page
Published 09/10/2006
Embedding Flash Video into a Web Page In this exercise, you insert an FLV file with a controller into a supplied web page in several easy steps. You have two options when you insert and display an FLV file in your HTML documents using the Flash Video component: -
Progressive Download Video: If you choose this video type, the video is downloaded to the user's hard drive, but starts playing the video before it finishes downloading. The video is downloaded from beginning to end, unless the user closes the connection before the download is complete. The user must have Flash Player 6 r65 (or greater) installed to see videos encoded with Sorensen Spark (included with Flash MX Professional 2004 and its standalone encoder). The user must have Flash Player 8 installed to see videos encoded with the On2 codec. For more information on which versions of Flash Player work with the different video codecs, search “on2 VP6 video codec”(with quotes) in Macromedia Flash 8 Help (F1). Note: The FLV video included with the article source files uses the Sorenson Spark codec, and can be viewed with Flash Player 6 r65 or greater. -
Streaming Video: If you choose this option, the video starts playing after a short buffer period, when a small amount of data downloads to the computer to ensure smooth playback. You must have Macromedia Flash Media Server available if you select this option. The user must have Flash Player 6 (or greater) installed to see your video, assuming it uses the Sorenson Spark codec. Depending on which video type you select in the pop-up menu the following steps will vary slightly. For this tutorial you use the Progressive Download Video option to display your video files. - Launch Dreamweaver 8. Choose File > Open from the main menu and select the video01.html file within the chickens folder.
- In either Design view or Split view, position your cursor within the editable content region and delete any existing text, such as "[insert video here] ."
- Select Insert > Media > Flash Video from the main menu to launch the Flash Video Component.
-
Select Progressive Download Video from the Select video type pop-up menu, and the appearance of the Flash Video dialog box changes to show the following options for this format: - URL: Specifies the URL of the FLV file to embed in your HTML document.
- Skin: Specifies the URL of the skin to load.
- Width: Specifies the width of FLV display.
- Height: Specifies the height of FLV display.
- Constrain: Maintains the aspect ration of the video if the width or height text boxes change the corresponding value.
- Detect Size: Detects the dimensions of the FLV file and automatically populates the Width and Height text boxes.
- Auto play: Specifies whether you play the video when the web page opens.
- Auto rewind: Specifies whether the playback control returns to the starting position after the video finishes playing.
- Prompt users to download Flash Player if necessary: When selected, this option embeds the required JavaScript code to detect users' Flash Player version and prompts them to download a newer version, if necessary. If this option is not selected, the Message text box is disabled.
- Message: A message displays if a user's current Flash Player version isn't high enough to view the Flash content.
Figure 3. Specify your options in the Flash Video dialog box. - Click the Browse button next to the URL text box. Navigate to the farmsite directory on your hard drive, select chicken01.flv from the videos folder, and click OK.
-
Select a skin from the Skin pop-up menu. For this exercise, select Clear Skin 3. The area below the Skin pop-up menu shows you a small preview of the specified skin's controller. Click the Detect Size button so Dreamweaver calculates the width and height of the current FLV file automatically, and then populates the text boxes with the correct dimensions of the video. Figure 4. This video controller uses the Clear Skin 3 skin. - Select the Auto play check box if you want the video to play automatically after the page loads. You need to ensure the Auto rewind check box is enabled if you want the video to return to the first frame after it completes.
-
Click OK to apply your settings, and Dreamweaver generates and inserts code that you need to embed the selected video into this web page. Embedding an FLV file and a player adds 8 lines of HTML code (provided that the Prompt users to download Flash Player if necessary check box was not selected), which configures the Flash Video component based on your selections. Based on the settings that you chose for this exercise, Dreamweaver inserts the following code into your document: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240" id="FLVPlayer"> <param name="movie" value="FLVPlayer_Progressive.swf" /> <param name="salign" value="lt" /> <param name="quality" value="high" /> <param name="scale" value="noscale" /> <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_3&streamName =../videos/chicken01&autoPlay=false&autoRewind=false" /> <embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_3&streamName =../videos/chicken01&autoPlay=false&autoRewind=false" quality="high" scale="noscale" width="320" height="240" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> The parameters you specify in the wizard are inserted into the previous HTML snippet, and pass information to Flash using FlashVars. The skin Clear_Skin_3 is copied to the same folder as the current HTML file, although it omits the file extension (.swf) in the HTML code. The second parameter, streamName, points to the FLV file you defined in the URL text box. It is a relative path and again omits the FLV file extension (.flv). The next two parameters are Boolean (true/false) values, which are based on your selections in the wizard. If you want to modify the skin or path to the FLV file, then you can modify these values directly using Code view in Dreamweaver. You might need to edit the width and height parameters manually in both the param and embed tags. These values represent the width and height of the FLV document; however, if you use certain default or custom skins, then you might need to modify these values if your skin contains a border and is larger than the dimensions of the FLV file. You will also notice that the values are repeated twice. Due to cross-browser issues, you need to define the FlashVars values in both a param tag as well as the embed tag so that the code works with Internet Explorer– and Netscape-based browsers Note: The actual SWF file that you need to drive the Flash Video component is a mere 10–12K, depending on whether you select the progressive download or streaming option. Using one of the default skins adds approximately another 4–11K, depending on the skin that you choose.
|
»
Exploring the Template Website
Published 09/10/2006
Getting Started In order to follow the steps in this tutorial, you must install Dreamweaver 8 and download the farm.zip sample file from this tutorial's introductory page. Exploring the Template Website Download the farm_fl8 (ZIP, 13.6MB) sample file if you haven't done so already and extract the contents to a new folder on your desktop called farmsite. The ZIP file contains an entire Dreamweaver template website, including Flash Video (FLV) files. The website template that you use for the following exercises has a distinct farm theme. The farm site consists of nine main folders, seven templates, a few dozen static HTML pages, and a cascading style sheet (see Figure 1). The purpose of the website is to display images and videos for six common farm animals. Each animal has its own sub-folder where you store HTML pages specific to that animal. For example, you store pages that display images or videos that relate to chickens in the chickens folder. You use the last three folders (called images, videos, and Templates) to organize the images, videos, and templates for the farm site. Figure 1. The farm website uses an intuitive folder structure. The site has a basic three-column design, where the left column contains the main site navigation, and the middle column displays content (text, images, and video). You nest templates in the right column to display thumbnail images for both videos and static images of animals (see Figure 2). Figure 2. The page layout is simple and contains thumbnails for the video you embed later on. Using nested templates enables you to add new pages easily to the site and automatically have the subnavigation added for you. Also, making changes to the animal-specific templates causes the changes to cascade to any file using that template. So if you need to modify the sub-navigation within the chicken template, all files based on that template are updated automatically.
|
»
Presenting Video with the Flash Video Component in Dreamweaver 8
Published 09/10/2006
Presenting Video with the Flash Video Component in Dreamweaver 8 The Macromedia Flash Video component in Dreamweaver 8 helps you easily insert and display Flash Video (FLV) files in your websites. It's great for Dreamweaver users who are not familiar with Flash, because you can insert FLV files into your web pages without using the Flash authoring tool. The Flash Video component enables you to select from several different playback controllers that visitors use to control the FLV file on your web page. You can choose also between two different options for delivering your video: progressive download or streaming. The Flash Video component uses a wizard interface that enables you to choose display and delivery options and preview the skin before you insert it on a web page. Despite the automated way the code inserts onto a web page, you have a lot of control over the end result. Using the Flash Video component isn't the only way to display FLV files on the web, but it's fast and easy. Customizing Video Controllers To find out how to customize playback controllers using Flash, check out the companion piece to the article, Creating Custom Video Controller Skins for the Flash Video Component in Dreamweaver 8. Requirements To make the most of this tutorial, you need to install the following software and files: Dreamweaver 8 Tutorials and sample files: Prerequisite Knowledge A basic understanding of editing website templates in Dreamweaver 8.
|
»
Designing with CSS in Dreamweaver MX 2004 – Part 6: Major Problem with Absolute Positioning
Published 06/9/2006
Major Problem with Absolute Positioning As I see it, the major problem with absolute positioning is this: You cannot clear an absolutely positioned element. This could cause problems and it's something you need to take into account when you consider the structure and layout of your designs. If you want a footer that expands the width of your wrapper, and you are unsure whether the navigation div might end up taller than the content div, then you have a problem. Recall how you were able to ensure that your footer always appeared below your content when you floated your navigation column by using the clear property. Absolutely positioned elements do not respect this. They just push straight through the footer regardless of any attempts you might make to force the footer below the absolutely positioned element. This can make your page very ugly, as your navigation div pushes right through your footer and out through the bottom of your design. Open withfooter.html in the Code view and preview the page in Firefox (see Figure 3). Figure 3. Footer in place with the design still intact Follow these steps to complete the next process: - In the Code view, locate the #nav selector.
- Change the height value to 700px.
- Preview your page. Note how the nav div pushes through the footer.
- Locate the #footer selector
- Place your cursor after
background-color: #036; and press Enter. - Type: clear: left;
- Save your work and preview the page in Firefox.
- Notice that the nav div still pushes through the footer.
While there is nothing wrong in principle with using positioned divs to create columns, you do need to be 100% sure that any absolutely positioned element will not cause this type of problem. As you have seen in earlier tutorials, a floated layout does not suffer from this type of scenario because you can clear floats. Surely Absolutely Positioned Elements Have Their Good Points Too? The answer to that question is yes. When you define an element as being absolutely positioned, it is taken out of the document flow. Unlike a floated element, an absolutely positioned div can be placed just about anywhere in your code. This can present some good search engine optimization opportunities. For example, you could move the nav div out of its current position in the source code and place it below the footer. Follow these steps to complete the next process: - Open withfooter.html in the Code view.
- Locate the #wrapper and #nav divs in the body of your page.
- Switch the positions around in the code. Your content div should now be before your nav div in the source order.
- Preview the page in Firefox. You will see that the nav div drops below the footer.
- Locate the
#nav selector. - Locate the
left: 10px; property and value. - Place your cursor after the closing semicolon (;) and press Enter.
- Type: top: 0;
- Preview your page in Firefox again. You will now see that the nav div moves to where it should be.
You now have a position where your content is above your navigation in the source order. This can be a good method for pushing your content at a search engine's bots. The content that matters now appears higher in the code than it would be with a floated column scenario. You have now seen two methods of creating a two-column layout. A bit of planning before you dive in will probably help you decide which method to use. Both have their strengths and weaknesses. The choice is yours. I hope you enjoyed working through this series. I know I enjoyed writing it. I plan to write another series that looks at other aspects of CSS. Stay tuned for it.
|
PSDTop offers Royalty Free files like PSDs and JPGs. PSD files are prepared for instant use in collages, banners, animations and other computer graphic related tasks - PSD files : PSD stock images & much more...!!! Files are multi layered and isolated. Just download a file, imort it to a program able to read .psd format (Adobe Photoshop, GIMP, other) and that's it - a new layer is added. PSD files are zipped to make transfer faster.
|