Ir para conteúdo
Fórum Script Brasil
  • 0

(Resolvido) swf no ie


iendic

Pergunta

Estou desenvolvendo um site com fla e estava testando so no firefox e por curiosidade abri ele no ie e então ele bloqueou.Teria como desativar o bloqueio do controle do active x para que o swf possa ser executado sem aquela mensagem chata. o pior e que no firefox funciona normal.

Link para o comentário
Compartilhar em outros sites

12 respostass a esta questão

Posts Recomendados

  • 0

consegui via java script

abra o bloco de notas e cole este arquivo

/*Lembre sempre de salvar o arquivo como flash.js*/

if(Browser == undefined){

var Browser = {

isIE: function(){ return (window.ActiveXObject && document.all && navigator.userAgent.toLowerCase().indexOf("msie") > -1 && navigator.userAgent.toLowerCase().indexOf("opera") == -1) ? true : false; }

}

}

var Flash = function(movie, id, width, height, initParams){

this.html = "";

this.attributes = this.params = this.variables = null;

this.variables = new Array();

this.attributes = {

"classid": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",

"codebase": "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0",

"type": "application/x-shockwave-flash"

}

this.params = { "pluginurl": "http://www.macromedia.com/go/getflashplayer_br" };

if(movie) {

this.addAttribute("data", movie);

this.addParameter("movie", movie);

this.addParameter("nemu",false)}

if(id && id != null) this.addAttribute("id", id);

if(width) this.addAttribute("width", width);

if(height) this.addAttribute("height", height);

if(initParams != undefined){

for(var i in initParams){

this.addParameter(i.toString(), initParams);

}

}

}

Flash.version = "1.2b";

Flash.getObjectByExceptions = function(obj, excep){

var tempObj = {};

for(var i in obj){

var inclui = true;

for(var j=0; j<excep.length; j++)

if(excep[j] == i.toString()) { inclui = false; break; };

if(inclui) tempObj = obj;

}

return tempObj;

}

Flash.prototype.addAttribute = function(prop, val){ this.attributes[prop] = val; }

Flash.prototype.addParameter = function(prop, val){ this.params[prop] = val; }

Flash.prototype.addVariable = function(prop, val){ this.variables.push([prop, val]); }

Flash.prototype.getFlashVars = function(){

var tempString = new Array();

for(var i=0; i<this.variables.length; i++)

tempString.push(this.variables.join("=));

return tempString.join("&");

}

Flash.prototype.toString = function(){

this.params.flashVars = this.getFlashVars();

if(Browser.isIE()){

//IE

this.html = "<ob" + "ject";

var attr = Flash.getObjectByExceptions(this.attributes, ["type", "data]);

for(var i in attr) if(i.toString() != "extend") this.html += " " + i.toString() + " = \"" + attr + "\"";

this.html += "> ";

var params = Flash.getObjectByExceptions(this.params, ["pluginurl", "extend"]);

for(var i in params) if(i.toString() != "extend") this.html += "<param name=\"" + i.toString() + "\" value=\"" + params + "\" /> ";

this.html += " </obj" + "ect>";

} else {

//non-IE

this.html = "<!--[if !IE]> <--> <obj" + "ect";

var attr = Flash.getObjectByExceptions(this.attributes, ["classid", "codebase"]);

for(var i in attr) if(i.toString() != "extend") this.html += " " + i.toString() + " = \"" + attr + "\"";

this.html += "> ";

var params = Flash.getObjectByExceptions(this.params, ["extend"]);

for(var i in params) if(i.toString() != "extend") this.html += "<param name=\"" + i.toString() + "\" value=\"" + params + "\" /> ";

this.html += " </obj" + "ect> <!--> <![endif]-->";

}

return this.html;

}

Flash.prototype.write = Flash.prototype.outIn = Flash.prototype.writeIn = function(w){

if(typeof w == "string" && document.getElementById) var w = document.getElementById(w);

if( w != undefined && w ) w.innerHTML = this.toString();

else document.write( this.toString() );

}

--------------------------------------------------------------------------------------------------------------------------

<script type="text/javascript" src="flash.js"></script> ////coloque este arquivo no >body>

<script type="text/javascript">

<!--

var teste1 = new Flash("fla/cabecalho2.swf", "menu", "798", "185"); /*largura e altura em px*/

teste1.write();

//-->

</script> este aruivo chama o swf para exibilo na pagina

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...