SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Turnersvill, NJ
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    my previous site http://www.keithlubrant.com/i.shtml (I renamed it) had a little FLASH intro that worked with IE. I just revamped my whole site and created a flash postcard to send to people. To view the postcard, I used this source...

    <SCRIPT LANGUAGE=JavaScript>
    <!--
    var ShockMode = 0;
    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
    if (navigator.plugins && navigator.plugins["Shockwave Flash"])
    ShockMode = 1;
    }
    if ( ShockMode ) {
    document.write('<EMBED SRC="postcard.swf"');
    document.write(' swLiveConnect=FALSE WIDTH=360 HEIGHT=357');
    document.write(' LOOP=true QUALITY=autohigh MENU=false BGCOLOR=#006699');
    document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
    document.write('</EMBED>');
    } else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
    document.write('<IMG SRC="keith.gif" BORDER=0>');
    }
    //-->
    </SCRIPT>

    I copied this source from my old site and adjusted the filename and height/width...For some reason, it will not load. Anybody have any clues?

    Thanks,
    Keith

  2. #2
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I checked this if() statement just to make sure, but I have the flash plugin and in IE 5, I tried to run:

    Code:
    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) { 
    if (navigator.plugins && navigator.plugins["Shockwave Flash"]) 
    alert('yes')
    }
    and I didn't get the alert, so that doesn't detect flash. To detect flash 5, try using:

    Code:
    <script language="JavaScript"> 
    function youhaveflash(){ 
    alert('You have Flash 5');
    } 
    function noflash(){ 
    alert("Please downloaded Flash 5"); 
    } 
    
    if(navigator.appName=="Netscape"){ 
    var fb=navigator.plugins["Shockwave Flash"].description; 
    var fv=Math.round(fb.charAt(fb.indexOf(".") - 1)); 
    if(fv==5){ 
    youhaveflash(); 
    }else{ 
    noflash(); 
    }}else{ 
    var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.5'); 
    if(swf){ 
    youhaveflash(); 
    }else{ 
    noflash(); 
    }} 
    </script>
    Hope that helps,
    aDog

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Turnersvill, NJ
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the response! I am going to work, but I will try it out when I get home.

    Thanks again,
    Keith


Bookmarks

Posting Permissions

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