Jump to content


Photo

Popup Não Abre Swf.


  • Faça o login para participar
4 replies to this topic

#1 phnx

phnx

    Turista

  • Usuários
  • 26 posts
  • Sexo:Não informado

Posted 06/11/2004, 11:57

Galera eu gostaria de usar arquivos swf no script abaixo. Pois ele é de uma popup que abre a depois de um tempo fecha sozinho mas não aceita swf só jpg ou gif.

///////////////////////////////////////////////////////////////////
/*Site Logo Script (Geocities Watermark)
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com/ */
///////////////////////////////////////////////////////////////////

//edit the below 5 steps

// 1) Tamanho da imagem
var logowidth=338
var logoheight=98
var logoimage=new Image(logowidth,logoheight)

// 2) change the image path to reflect the path of your logo image
logoimage.src="imagem.gif"

// 3) Change url below to the target URL of the logo
var logolink="http://www.site.com/"

// 4) change the alttext variable to reflect the text used for the "alt" attribute of the image tag
var alttext="Muvuca Beer Fest"

// 5) Finally, below variable determines the duration the logo should be visible after loading, in seconds. If you'd like the logo to appear for 20 seconds, for example, enter 20. Entering a value of 0 causes the logo to be perpectually visible. 
var visibleduration=10

// Optional parameters
var Hoffset=300//Enter logo's offset from right edge of window (edit only if you don't like the default offset)
var Voffset=100 //Enter logo's offset from top edge of window (edit only if you don't like the default offset)


///////////////////////////Do not edit below this line/////////////////////////

var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1

var watermark_obj=ie? document.all.watermarklogo : document.getElementById? document.getElementById("watermarklogo") : document.watermarklogo

function insertimage(){
if (ie||document.getElementById)
watermark_obj.innerHTML='<a href="'+logolink+'"><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>'
else if (document.layers){
watermark_obj.document.write('<a href="'+logolink+'"><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>')
watermark_obj.document.close()
}
}

function positionit(){
var dsocleft=ie? document.body.scrollLeft : pageXOffset
var dsoctop=ie? document.body.scrollTop : pageYOffset
var window_width=ie? document.body.clientWidth : window.innerWidth-20

if (ie||document.getElementById){
watermark_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-logowidth-Hoffset
watermark_obj.style.top=parseInt(dsoctop)+5+Voffset
}
else if (document.layers){
watermark_obj.left=dsocleft+window_width-Hoffset-logowidth
watermark_obj.top=dsoctop+window_height+5+Voffset
}
}

function hidewatermark(){
if (document.layers)
watermark_obj.visibility="hide"
else
watermark_obj.style.visibility="hidden"
clearInterval(watermarkinterval)
}

function beingwatermark(){
watermarkinterval=setInterval("positionit()",50)
insertimage()
if (visibleduration!=0)
setTimeout("hidewatermark()",visibleduration*1000)
}

if (ie||document.getElementById||document.layers)
window.onload=beingwatermark


(y) (y) (y) (y)

#2 Alex Hiroshi

Alex Hiroshi

    Super Veterano

  • Ex-Admins
  • 4923 posts
  • Sexo:Masculino
  • Localidade:São Paulo - SP

Posted 07/11/2004, 02:35

para rodar um arquivo swf vc pode usar a tag <embed> por exemplo...
entao basta trocar a tag <img> pela tag <embed>

watermark_obj.innerHTML='<a href="'+logolink+'"><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>'
else if (document.layers){
watermark_obj.document.write('<a href="'+logolink+'"><img src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" border=0 alt="'+alttext+'"></a>')
watermark_obj.document.close()
}

mude essas partes para algo do tipo
<embed src="'+logoimage.src+'" width="'+logowidth+'" height="'+logoheight+'" ></embed>
(y)
Fórum WMO - Equipe de Desenvolvimento / Banco de Dados - Ex-Administrador

#3 phnx

phnx

    Turista

  • Usuários
  • 26 posts
  • Sexo:Não informado

Posted 08/11/2004, 16:02

Funcionou ok (y)

E como deixo o swf transparente utilizando o mesmo codigo acima.

#4 Alex Hiroshi

Alex Hiroshi

    Super Veterano

  • Ex-Admins
  • 4923 posts
  • Sexo:Masculino
  • Localidade:São Paulo - SP

Posted 09/11/2004, 05:41

use wmode="transparent" juto a tag <embed>
Fórum WMO - Equipe de Desenvolvimento / Banco de Dados - Ex-Administrador

#5 phnx

phnx

    Turista

  • Usuários
  • 26 posts
  • Sexo:Não informado

Posted 09/11/2004, 10:58

(y) (y) (y) (y) (y) (y) (y) (y) (y) :D




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq