Visualizzazione dei risultati da 1 a 8 su 8

Discussione: Detect per Flash MX?

  1. #1

    Detect per Flash MX?

    Salve a tutti.

    Da un po' di tempo mi è sorto un dubbio.
    Nelle guide di questo sito è spiegato come realizzare un ottimo sistema per verificare la presenza del corretto flash player nella macchina dell'utente. Questo sistema era però stato concepito per la versione 6 di flash. Cosa si deve fare adesso che siamo arrivati alla versione 7 (o MX 2004) di flash?
    Quali modifiche devo apportare ai file utilizzati finora?

    Spero di trovare una risposta in questo forum.

    Grazie
    <-- Fare. O non fare. Non c'è provare. -->

    www.yodastudio.com
    segui YODA Studio su facebook

  2. #2
    Utente di HTML.it L'avatar di NAP
    Registrato dal
    Jan 2001
    Messaggi
    4,398
    Ciao,

    nessuna modifica. Ti spiego il perché:

    Supponiamo che ti venga a visitare un utente con Windows 95 ed I-Explorex 3, strano ma vero, ce ne sono ancora parecchi, e che tu abbia fatto un sito con Flash 5. A quel visitatore, grazie all' <object classid e all' <embed src che c'è nella tua pagina html che incorpora il filmato Flash, comparirà la scheda di installazione per il player Flash... Quale Player ? Il più attuale, ovviamente, l'unico disponibile in Macromedia.

    Se il browser non è tanto obsoleto, allora, installando il player 7, il visitatore potrà visualizzare correttamente tutti i file swf in qualsiasi versione siano stati creati.

    Un player attuale, il 7 per es, non serve a chi deve visualizzare i filmati fatti con Flash 2004 bensì a chiunque e in qualunque versione sia stato fatto il filmato.
    Il player più attuale legge i file di tutte le versioni precedenti.

    Ciao,

    NAP
    A volte la diplomazia va condita con un pizzico di siluri fotonici. (K. Janeway)

  3. #3
    Ciao Nap

    Ti ringrazio per la chiarissima spiegazione. Mi rimane ancora qualche dubbio: sapevo già che la più recente versione del flash player legga senza problemi i file realizzati con le versioni precedenti, ma nel flash detector si fa chiarissimo riferimento alla versione 6.
    Mi spiego meglio: arrivando nell'home page, si passaad una pagina che, tramite java script, verifica la presenza o meno del flash player (e della sua versione) presente nella macchina dell'utente. Ecco di seguito lo script (compilato dalla Macromedia e modificato da Negatyve se non ricordo male):

    var MM_FlashSnifferURL = "detectFlash.swf";

    var MM_latestPluginRevision = new Object();
    MM_latestPluginRevision["6.0"] = new Object();
    MM_latestPluginRevision["5.0"] = new Object();
    MM_latestPluginRevision["4.0"] = new Object();
    MM_latestPluginRevision["3.0"] = new Object();
    MM_latestPluginRevision["2.0"] = new Object();

    /*
    * This table must be updated as new versions and revisions of the
    * plug-in are released, in support of the 'requireLatestRevision'
    * option in MM_FlashDispatch().
    */
    //FS 103101 - the 6.0 revision numbers need to be updated once we know the revision numbers will be.
    MM_latestPluginRevision["6.0"]["Windows"] = 00;
    MM_latestPluginRevision["6.0"]["Macintosh"] = 00;

    MM_latestPluginRevision["5.0"]["Windows"] = 30;
    MM_latestPluginRevision["5.0"]["Macintosh"] = 30;

    MM_latestPluginRevision["4.0"]["Windows"] = 28;
    MM_latestPluginRevision["4.0"]["Macintosh"] = 27;
    MM_latestPluginRevision["4.0"]["Unix"] = 12;

    MM_latestPluginRevision["3.0"]["Windows"] = 10;
    MM_latestPluginRevision["3.0"]["Macintosh"] = 10;

    MM_latestPluginRevision["2.0"]["Windows"] = 11;
    MM_latestPluginRevision["2.0"]["Macintosh"] = 11;


    var MM_FlashControlInstalled;
    var MM_FlashControlVersion;

    function MM_FlashInfo()
    {
    if (navigator.plugins && navigator.plugins.length > 0)
    {
    this.implementation = "Plug-in";
    this.autoInstallable = false;

    if (navigator.plugins["Shockwave Flash"])
    {
    this.installed = true;

    var words =
    navigator.plugins["Shockwave Flash"].description.split(" ");

    for (var i = 0; i < words.length; ++i)
    {
    if (isNaN(parseInt(words[i])))
    continue;

    this.version = words[i];


    this.revision = parseInt(words[i + 1].substring(1));
    }
    }
    else
    {
    this.installed = false;
    }
    }
    else if (MM_FlashControlInstalled != null)
    {
    this.implementation = "ActiveX control";
    this.installed = MM_FlashControlInstalled;
    this.version = MM_FlashControlVersion;
    this.autoInstallable = true;
    }
    else if (MM_FlashDetectedSelf())
    {
    this.installed = true;
    this.implementation = "Plug-in";
    this.autoInstallable = false;
    }

    this.canPlay = MM_FlashCanPlay;
    }




    var MM_FlashPluginsPage = "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";

    function MM_FlashDispatch(contentURL, contentVersion, requireLatestRevision,
    upgradeURL, install, installURL, altURL,
    overridePluginsPage,disableAutoInstall)
    {
    if (disableAutoInstall == null)
    {
    alert("ERROR: MM_FlashDispatch() called with too few arguments.");
    return;
    }


    if (overridePluginsPage && installURL.substring(0, 7) != "http://")
    {
    alert("ERROR: MM_FlashDispatch() called with relative URL" +
    " for PLUGINSPAGE (" + installURL + ")");

    return;
    }


    var player = new MM_FlashInfo();

    if (player.installed == null)
    {
    var sniffer =
    "<EMBED HIDDEN=\"true\" TYPE=\"application/x-shockwave-flash\"" +
    " WIDTH=\"18\" HEIGHT=\"18\"" +
    " BGCOLOR=\"" + document.bgcolor + "\"" +
    " SRC=\"" + MM_FlashSnifferURL +
    "?contentURL=" + contentURL + "?" +
    "&contentVersion=" + contentVersion +
    "&requireLatestRevision=" + requireLatestRevision +
    "&latestRevision=" +
    MM_FlashLatestPluginRevision(contentVersion) +
    "&upgradeURL=" + upgradeURL +
    "\"" +
    " LOOP=\"false\" MENU=\"false\"" +
    " PLUGINSPAGE=\"" +
    (overridePluginsPage ? installURL : MM_FlashPluginsPage) +
    "\"" +
    ">" +
    "</EMBED>";

    document.open();
    document.write("<HTML><HEAD><TITLE>");
    document.write("Checking for the Flash Player");
    document.write("</TITLE></HEAD>");
    document.write("<BODY BGCOLOR=\"" + document.bgcolor + "\">");
    document.write(sniffer);
    document.write("</BODY>");
    document.write("</HTML>");
    document.close();
    }
    else if (player.installed)
    {
    if (player.canPlay(contentVersion, requireLatestRevision))
    {
    location = contentURL;
    }
    else
    {
    if (disableAutoInstall)
    {
    location = upgradeURL;
    }else
    {
    location = player.autoInstallable ? contentURL : upgradeURL;
    }
    }
    }
    else if (install)
    {
    if (disableAutoInstall){
    location = installURL;
    }
    else{
    location = player.autoInstallable ? contentURL : installURL;
    }
    }
    else
    {
    location = altURL;
    }
    }




    function MM_FlashRememberIfDetectedSelf(count, units)
    {
    // the sniffer appends an empty search string to the URL
    // to indicate that it is the referrer

    if (document.location.search.indexOf("?") != -1)
    {
    if (!count) count = 60;
    if (!units) units = "days";

    var msecs = new Object();

    msecs.minute = msecs.minutes = 60000;
    msecs.hour = msecs.hours = 60 * msecs.minute;
    msecs.day = msecs.days = 24 * msecs.hour;

    var expires = new Date();

    expires.setTime(expires.getTime() + count * msecs[units]);

    document.cookie =
    'MM_FlashDetectedSelf=true ; expires=' + expires.toGMTString();
    }
    }




    function MM_FlashDemur(count, units)
    {
    if (!count) count = 60;
    if (!units) units = "days";

    var msecs = new Object();

    msecs.minute = msecs.minutes = 60000;
    msecs.hour = msecs.hours = 60 * msecs.minute;
    msecs.day = msecs.days = 24 * msecs.hour;

    var expires = new Date();

    expires.setTime(expires.getTime() + count * msecs[units]);

    document.cookie =
    'MM_FlashUserDemurred=true ; expires=' + expires.toGMTString();


    if (!MM_FlashUserDemurred())
    {
    alert("Your browser must accept cookies in order to " +
    "save this information. Try changing your preferences.");

    return false;
    }
    else
    return true;
    }




    function MM_FlashUserDemurred()
    {
    return (document.cookie.indexOf("MM_FlashUserDemurred") != -1);
    }




    function MM_FlashLatestPluginRevision(playerVersion)
    {
    var latestRevision;
    var platform;

    if (navigator.appVersion.indexOf("Win") != -1)
    platform = "Windows";
    else if (navigator.appVersion.indexOf("Macintosh") != -1)
    platform = "Macintosh";
    else if (navigator.appVersion.indexOf("X11") != -1)
    platform = "Unix";

    latestRevision = MM_latestPluginRevision[playerVersion][platform];

    return latestRevision;
    }




    function MM_FlashCanPlay(contentVersion, requireLatestRevision)
    {
    var canPlay;

    if (this.version)
    {
    canPlay = (parseInt(contentVersion) <= this.version);

    if (requireLatestRevision)
    {
    if (this.revision &&
    this.revision < MM_FlashLatestPluginRevision(this.version))
    {
    canPlay = false;
    }
    }
    }
    else
    {
    canPlay = MM_FlashDetectedSelf();
    }

    return canPlay;
    }




    function MM_FlashDetectedSelf()
    {
    return (document.cookie.indexOf("MM_FlashDetectedSelf") != -1);
    }

    Non capendo un'acca di java script, mi sono limitato a copiare ed a seguire le indicazione. Però, come noterai nella riga evidenziata, si dice chiaramente di aggiornare il numero relativo all'ultima versione del flash player una volta che questo viene realizzato. QUindi, ne deduco che questa operazione vada fatta. Ma, mi chiedo, basta quest'unica modifica per aggiornare il flash detector?
    Inoltre, mi è stato detto che questo sistema di verifica funziona solo con IE e NN, o meglio non funziona con gli altri browser. Chi mi sa dire di più a riguardo?
    Grazie ancora.
    <-- Fare. O non fare. Non c'è provare. -->

    www.yodastudio.com
    segui YODA Studio su facebook

  4. #4
    up
    <-- Fare. O non fare. Non c'è provare. -->

    www.yodastudio.com
    segui YODA Studio su facebook

  5. #5
    il detect te lo crea il flash stesso in esportazione.
    Publish Settings, vai su HTML, spunti detect version, passi pagina detect ( la crea lui ) , pagina con l'swf e pagina con la gif alternativa.

    Ok, publish

    C'e' pero' da dire una cosa, il player per Linux vede lostesso i filmati in flash 7, solo che le nuove funzioni non le utilizza e in quel caso ti conviene fare direttamente il controllo nell' swf con System.capabilities.version ( compatibile Flash >= MX )
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

  6. #6
    Grazie Andr3a.

    Mi spiegheresti meglio questa faccenda di Linux che non ci ho capito un'acca? O meglio, come impostare questo controllo nell'swf di cui parli?

    Grazie ancora
    <-- Fare. O non fare. Non c'è provare. -->

    www.yodastudio.com
    segui YODA Studio su facebook

  7. #7
    up
    <-- Fare. O non fare. Non c'è provare. -->

    www.yodastudio.com
    segui YODA Studio su facebook

  8. #8
    codice:
    if( !_root.getSWFVersion() ) {
    	trace( "non compatibile con il player 7" );
    }
    Formaldehyde a new Ajax PHP Zero Config Error Debugger

    WebReflection @WebReflection

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.