Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/02/2007, 05:46
josusaar
 
Fecha de Ingreso: septiembre-2006
Mensajes: 84
Antigüedad: 17 años, 7 meses
Puntos: 0
Detectar si esta instalado el plugin de flash...

Hola buenas:
Acabamos de terminar una web en flash, y antes de nada queremos que se detecte si el usuario que esta visitando la web tiene instalado el pluging de flash, y si no lo tiene instalado, k le de la opcion de hacerlo, como en este caso: http://www.originalchameleon.com/ , para ello hemos conseguido un codigo k se suele poner en el primer fotograma del swf, k seria el siguiente:

Código:
System.security.allowDomain("*");
System.useCodepage = false;
var ExpressInstall = function ()
{
    this.needsUpdate = _root.MMplayerType == undefined ? (false) : (true);
};
ExpressInstall.prototype = {init: function ()
{
    if (this.needsUpdate)
    {
        this.loadUpdater();
        return(true);
    }
    else
    {
        return(false);
    } // end if
}, loadUpdater: function ()
{
    System.security.allowDomain("fpdownload.macromedia.com");
    this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000);
    var _self = this;
    this.updater.installStatus = _self.onInstallStatus;
    this.hold = this.updater.createEmptyMovieClip("hold", 1);
    this.updater.onEnterFrame = function ()
    {
        if (typeof(this.hold.startUpdate) == "function")
        {
            _self.initUpdater();
            this.onEnterFrame = null;
        } // end if
    };
    var _l3 = Math.random();
    this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + _l3);
}, initUpdater: function ()
{
    this.hold.redirectURL = _root.MMredirectURL;
    this.hold.MMplayerType = _root.MMplayerType;
    this.hold.MMdoctitle = _root.MMdoctitle;
    this.hold.startUpdate();
}, onInstallStatus: function (msg)
{
    if (msg == "Download.Complete")
    {
    }
    else if (msg == "Download.Cancelled")
    {
        getURL("javascript:alert(\'This content requires a more recent version of the Macromedia Flash Player.\')");
    }
    else if (msg == "Download.Failed")
    {
        getURL("javascript:alert(\'There was an error downloading the Flash Player update. Please try again later, or visit macromedia.com to download the latest version of the Flash plugin.\')");
    } // end if
}};
if (_root.FORCEINSTALL != "false")
{
    trace("_root.FORCEINSTALL" + _root.FORCEINSTALL);
    var ExpressInstall = new ExpressInstall();
    if (ExpressInstall.needsUpdate)
    {
        ExpressInstall.init();
        stop();
    } // end if
} // end if
Pero la cosa es, k despues de insertar ese codigo en el .fla y luego crear el swf, todo sigue como antes, y al visitante k no tiene instalado el plugin de flash, no le da ninguna opcion de instalarlo.
Por favor ayudadme con esto, por k tenemos hechas algunas webs con flash, y tenemos k poner esta opcion a todas...
Venga SALU2 y gracias de antemano.