Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating a Sniffer using the Flash Connection Kit and DreamWeaver Greg Shorts CIS 254.

Similar presentations


Presentation on theme: "Creating a Sniffer using the Flash Connection Kit and DreamWeaver Greg Shorts CIS 254."— Presentation transcript:

1 Creating a Sniffer using the Flash Connection Kit and DreamWeaver Greg Shorts CIS 254

2 JavaScript to Detect Flash <!-- function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0 var ok=false; document.MM_returnValue = false; with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) { ok=(plugins && plugins[plgIn]); } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1 if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash; else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir; else ok=autoGo; } if (!ok) theURL=altURL; if (theURL) window.location=theURL; } //-->

3 Body Statement

4 Necessary VB Script <!-- with (navigator) if (appName.indexOf('Microsoft')!=-1 && appVersion.indexOf('Mac')==-1) document.write(''+ ' \nOn error resume next\n'+ 'MM_dir = IsObject(CreateObject("SWCtl.SWCtl.1"))\n'+ 'MM_flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash" ))\n '); //-->

5 Dreamweaver Behavior The previous Javascript is also available as a DreamWeaver Behavior –Default in MX –Select “plug-in from the behaviors menu –Give directions for pages with and without Flash

6 What is the Connection Kit? The Macromedia Flash Detection Kit is a combination of software and techniques that enables web developers to deploy content created with Macromedia Flash software in such a way as to make sure the user's experience is as seamless as possible. There are four different methods to choose from, depending on the user's needs and familiarity with the different technologies being used.

7 Types of Connection Kits Dreamweaver Behavior Method ActionScript Method HTML Method Standalone Player Method –For devices like cell phones

8 Getting the Connection Kit Available from Macromedia Developer Site –http://www.macromedia.com/support/flash/pla yer/flash_development_readmehttp://www.macromedia.com/support/flash/pla yer/flash_development_readme –Requires Registration For class the file is available at www.digitalfabrications.com/flashd.zip www.digitalfabrications.com/flashd.zip

9 Using DreamWeaver Method Flash Detector behavior must be installed on machines Site must be created in Dreamweaver Use Behavior Window to access behaviors Insert Macromedia Flash Detection Behavior

10 Behavior Choices

11 Behavior Description Applied to a web page that appears before any Flash content is displayed on your site. –Usually this is the index.html or default.html. Redirect the user to the appropriate page, based on decisions specified in the behavior. User will not see the page before they are redirected. Therefore, there is no need for graphics or text on this page.

12 Behavior Choices (cont.) Macromedia Flash Content URL –This is the URL of the web page that will contain your Flash content. Alternate Non-Flash URL –This is the URL for alternate non-Flash content or an upgrade page. The behavior will point to this page when the user doesn't have the required version of Flash.

13 Behavior Choices (cont.) Minimum Flash Player Version –This is the version of Flash that is required to play your Flash content. –The selection allows you to include version, major revision and minor revisions.

14 Behavior Choices (cont.) Allow Auto-Update –Check this box if you want to auto-update the Macromedia Flash Player. –Currently only applies to Microsoft Internet Explorer on Windows. –Rude

15 Deployment Instructions The following files should be uploaded to your server: flash_detection.swf - this name should not be changed. yourfile.html - this name is often "index.html". This is the file to which you applied the behavior. any HTML file specified in altContentURL any HTML file specified in flashContentURL

16 Creating the Flash_detect.swf File Open Flash Open New Flash Document Save as Flash_detect.swf Open Action Development Panel

17 Whirlwind Tour of Action Development Panel Jump Menu Actions Tool Box Actions Information Action Parameters Script Pane Pinning

18 Action Script Types Frame –Apply to frame –Initiate when frame entered Object –Apply to objects –Initiate when object selected or acted upon

19 Flash Detector Frame based Action Script Detects Flash Version and Revision –Sends user to Flash Content URL if correct version is present –Sends User to Alt Content URL if no flash or wrong version

20 Set Variables URLs Versions –Content Requirement –Latest Versions –Require Latest Version Auto Install –IE only

21 Using the Provided Materials, Set the Variables

22 Break the Version String into usable parts –Must use depreciated commands to allow Flash 4.0 to use.

23 Check against latest Version Uses Latest Version Variables –Script Entered Variables –Script must be changed if Macromedia updates Flash Player Only used if requireLatestVersion eq “true”

24 Check against content version First Check for Auto Install Then check for content version

25 Flash 3 Test At the end of the script put in a test for Flash 3 –Must be at the end Other versions will finish processing before they get to this spot. –Sends the player to the Alt URL Flash 3 does not allow the variable to control the URL.


Download ppt "Creating a Sniffer using the Flash Connection Kit and DreamWeaver Greg Shorts CIS 254."

Similar presentations


Ads by Google