A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: browser sensing

  1. #1
    human
    Join Date
    May 2000
    Posts
    132
    anyone know how to sense for flash player versions before loading the movie?

  2. #2
    Senior Member Knoj's Avatar
    Join Date
    Sep 2000
    Location
    Ames IA
    Posts
    361
    Yepper!

    Yepper! I have a script here that detects to make sure Flash version 4, or 5 is loaded... ...Then it opens a full screen window. You can modify it to your needs! If you want to make it exclude version 4, then you can modify it! If you need help, just e'mail me: [email protected] (that goes for anyone!)

    Ok, this is an all in one script, it detects for browser, and detects flash version accordingly, then opens the window...

    This is the entire HTML document:

    Code:
    <html>
    <head>
            <title>a.t.o. - Records</title>
    
    
    <SCRIPT LANGUAGE="JavaScript" type="text/Javascript">
    function popUpCenteredWindow() {
            var iMyWidth;
            var iMyHeight;
            //Gets user's resolution.
            iMyWidth = (window.screen.width) - 10; //The screen width(- 5 for the border).
            iMyHeight = (window.screen.height) - 10; //The screen height (- 5 for the border).
            var win2 = window.open("ato.html","Window2","status=0,height=" + iMyHeight + ",width=" + iMyWidth + ",resizable=no,left=0,top=0,scrollbars=no");
            win2.focus();
    }
    
    
    
    if (navigator.appName.indexOf("Netscape") > -1){
    	fp=0;
    	for (i=0; i<navigator.plugins.length; i++){
    	    if (navigator.plugins[i].description.indexOf("Flash 5") > -1){
        	    fp=1;
    		}
    		if (navigator.plugins[i].description.indexOf("Flash 4") > -1){
            fp=1;
        	}
    	}	
    	if (fp == 0) {
        	document.write('<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"><img src="flashwarning.gif" border=0></a>');
        	document.write('<P>');
    	}
    }
    if (navigator.appName.indexOf("Microsoft") > -1)
        fp=1;
    if (fp == 1) {
    	document.write('<body bgcolor="white">');
    	document.write(' <p> <p>');
    	document.write('<center><A HREF="javascript:void(0);" onClick="popUpCenteredWindow();"><img src="ato.gif" width="296" height="227" border=0></A></center>');
    	popUpCenteredWindow();
    }
    </SCRIPT>
    
    
    </head>
    
    <body bgcolor="white">
    </body>
    </html>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center