ONLINEGRAPHICPROOFING.COM

fire proof paper - www.onlinegraphicproofing.com

Menu


versions 4.0 and earlieror any browser other than Netscape or Internet Explorer, such as Firefoxthe page is redirected to altindex.htm. try


it for yourself in all three browsers. You'll notice that, when you preview the page in Firefox and click the Check Browser button, the page redirects to altindex.htm. Of course, the best way to integrate this functionality is by placing it in a splash page called index.htm that the user doesn't ever get to see. Ideally, when index.htm loads, the Check Browser behavior script runs, checks the browser type, and then redirects accordingly. This would make the process much more seamless than forcing the user to click a button. Check Plugin Similar to the Check Browser behavior, the Check Plugin behavior makes it possible to check whether end users have a specific plug-in such as QuickTime, Flash, Shockwave, LiveAudio, or Windows Media Player installed on their systems. If the plug-in is detected, you can send the users to a specific page. If it's not found however, you can direct them to an alternate page. To demonstrate this behavior, follow these instructions: 1. With your cursor in the same page we've been working with, insert a new Button form object by clicking the Button icon from the Forms category of the Insert bar. 2. When the Add Form Tag dialog appears, click No. 3. With the Button form object selected, change the Action to None so that the button doesn't try to submit or reset the non-existent form when it's clicked. You can also change the Label to read anything you'd like. I'll change mine to say Check Plugin. 4. With the Button object selected, choose the Check Plugin behavior from the Add (+) menu in the Behaviors panel. The Check Plugin dialog appears. 5. As you can see, the dialog allows you to check for one of the five plug-ins listed earlier by choosing the specific option from the Plugin: Select menu. If the plug-in you need is not listed in the menu, click the Plugin: Enter radio button and type one of your choice in the text box. In the If Found, Go to URL text box, enter the URL to go to if the plug-in is found. Alternatively, enter the URL of the page to go to if the plug-in was not found in the Otherwise, Go to URL text box. Often, visitors without the plug-in are prompted by the browser to download the plug-in. If the plug-in content is not essential to your page, leave the final Always Go to First URL if Detection Is Not Possible check box option deselected. When you've finished, your dialog may resemble mine (see Figure 10.12). Figure 10.12. Check for the Flash plug-in and enter pages to go to if the plug-in is detected or if it cannot be detected. [View full size image] 6. Click OK. 7. If the selected event isn't onClick, change it to onClick now. Save your work and test the results in the browser by choosing the Preview in Browser option (or by pressing F12). If you're using a modern browser that has the Flash plug-in already installed, the page should redirect to index.htm right after the user clicks the Check Plugin button. Again, ideally, you'd want to create a page that detects the plug-in and responds accordingly. With this behavior, however, you can simply leave the If Found, Go to URL text box blank. If the plug-in is found, the user will stay in the same page; otherwise the browser will display the alternate URL. Control Shockwave or Flash As you'll see in Chapter 20, "Integrating with Flash and Shockwave," you can control the animation of Flash and Shockwave movies using the Control Shockwave or Flash behavior. For instance, you might want to add a button that, when clicked, plays, stops, or goes to a specific point in the movie's timeline. All of this, as you'll see in Chapter 20, is possible with the Control Shockwave or Flash behavior. Drag Layer