¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

[JavaScript]Frases en diagonal

2 participantes

Ir abajo

[JavaScript]Frases en diagonal Empty [JavaScript]Frases en diagonal

Mensaje por cjum Jue Mar 04, 2010 7:44 pm

Aparece una frase en la parte izquierda superior de la página en diagonal que cambia de texto cada x segundos. Efecto muy logrado.

Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:

Código:
// le réalisateur :
// CREDITS:
// First diagonal textscroller worldwide by Urs Dudli and Peter Gehrig
// Copyright (c) 1999 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.ch.
// info@24fun.ch
// 1/4/2000

// IMPORTANT:
// If you add this script to a script-library or script-archive
// you have to add a link to http://www.24fun.ch on the webpage
// where First diagonal textscroller worldwide will be running.

if (document.layers) {
   alert("Explorer seulement")
}
//vous mettez ci-dessous tout les textes que vous voulez (en rajoutant un nombre après "message [")
var message = new Array()
message[0]="AQUI VA UNA FRASE"
message[1]="UN SEGUNDO TEXTO AQUI"
message[2]="PUEDES CONTINUAR"
message[3]="INSERTANDO MAS FRASES"
message[4]="SON ILIMITADAS"
message[5]="SI UTILIZAS ESTE SCRIPT"
message[6]="NO OLVIDES"
message[7]="PONER UN LINK"
message[8]="A MUNDOJAVASCRIPT.COM"
message[9]="EN TU WEB"
message[10]="TE LO AGRADECERIAMOS MUCHO"
message[11]="GRACIAS POR TU VISITA"
message[12]="VUELVE A VISITARNOS"
message[13]="MUCHAS GRACIAS"


var i_message=0

var scrollerheight=250
var scrollerwidth=400

var startheight=0

var font_size=25
var font_family="Times"

var timer

function initiate() {
      document.all.rotationstyle.style.posLeft=-(Math.floor(scrollerwidth/2))+font_size
      document.all.rotationstyle.style.posTop=startheight
        startscroll()
}

function startscroll() {
   if (document.all) {
      do_rotate="yes"
        rotationstyle.filters[0].apply()
      rotationstyle.innerHTML=
      '<OBJECT ID="rotationobj" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+
        '<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+
        '<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+
      '<PARAM NAME="Line0003" VALUE="SetFillColor(0,0,0)">'+
      '<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 400, 0, 0, 0)">'+
      '<PARAM NAME="Line0005" VALUE="Text(\''+message[i_message]+'\', 0, 0, 0)">'+
      '</OBJECT>'      
        rotationstyle.filters[0].play()
        rotationobj.Rotate(0,0,-45)
 
        i_message++
        if (i_message>=message.length) {i_message=0}
      timer=setTimeout("startscroll()",4000)
   }
}

function stopscroll() {
   do_rotate="no"
}

// - End of JavaScript - -->
</SCRIPT>

Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY:

Código:
<!-- Consigue este JavaScript y otros muchos en MundoJavaScript.com -->
<SPAN id=rotationstyle
style="FILTER: revealTrans(Transition=3, Duration=2); LEFT: -2000px; POSITION: absolute">
<OBJECT classid=CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6
id=rotationobj></OBJECT></SPAN>

Hay que añadir el siguiente evento onload dentro de la etiqueta BODY:

Código:
onload=initiate()

Fuenté: MundoJavaScript.Com
cjum
cjum

Cantidad de envíos : 7
Fecha de inscripción : 19/04/2009

http://web-style-3d.es.tl

Volver arriba Ir abajo

[JavaScript]Frases en diagonal Empty Re: [JavaScript]Frases en diagonal

Mensaje por Ztex-! Vie Mar 05, 2010 3:08 am

Gracias Por Tu Aporte, Seria Mejor Que Pucieras Una Foto @
Atte:Ztex-!

Ztex-!

Cantidad de envíos : 6
Fecha de inscripción : 05/03/2010

http://ExtremeLand.es.tl

Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.