Documentos de Académico
Documentos de Profesional
Documentos de Cultura
<style type="text/css">
#im {
FILTER: alpha(opacity=50)
}
</style>
<script language="JavaScript1.2">
function high(which2)
{
theobject=which2;
highlighting=setInterval("highlightit(theobject)",50);
}
function low(which2)
{
clearInterval(highlighting);
which2.filters.alpha.opacity=50;
}
function highlightit(cur2)
{
if(cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if(window.highlighting)
clearInterval(highlighting)
}
</script>
<script language="javascript">
imagen1=new Image
imagen1.src="imagen1.gif"
imagen2=new Image
imagen2.src="imagen2.gif"
var i=1;
function cambiar() {
if (i == 1)
document.images['ejemplo'].src=imagen2.src
i=2;
else
{
document.images['ejemplo'].src=imagen1.src;
i=1;
</script>
Efecto rayo
<html><BR><head><BR><style><BR><!--
<BR>.intro{<BR>position:absolute;<BR>left:0;<BR>top:0;<BR>layer-background-
color:green;<BR>background-color:green;<BR>border:0.1px solid green;<BR>z-
index:10;<BR>}<BR>--><BR></style></p><p></head></p><p><body></p><p><div
id="p1" class="intro"></div><BR><div id="p2" class="intro"></div><BR><div
id="p3" class="intro"></div><BR><div id="p4" class="intro"></div><BR><div
id="p5" class="intro"></div><BR><div id="p6" class="intro"></div><BR><div
id="p7" class="intro"></div><BR><div id="p8" class="intro"></div><BR><div
id="p9" class="intro"></div><BR><div id="p10" class="intro"></div><BR><div
id="p11" class="intro"></div><BR><div id="p12" class="intro"></div><BR><div
id="p13" class="intro"></div><BR><div id="p14" class="intro"></div><BR><div
id="p15" class="intro"></div><BR><div id="p16" class="intro"></div><BR><div
id="p17" class="intro"></div><BR><div id="p18" class="intro"></div><BR><div
id="p19" class="intro"></div><BR><div id="p20" class="intro"></div><BR><div
id="p21" class="intro"></div><BR><div id="p22" class="intro"></div><BR><div
id="p23" class="intro"></div><BR><div id="p24" class="intro"></div><BR><div
id="p25" class="intro"></div></p><p><script></p><p>/*<BR>Boxing-away Script-
By Dynamic Drive (www.dynamicdrive.com)<BR>For full source code, 100's more
free DHTML scripts, and TOS,<BR>visit
http://www.dynamicdrive.com<BR>*/</p><p><BR>var espeed=300<BR>var
counter=1<BR>var temp=new Array()<BR>var temp2=new Array()</p><p>var
ns4=document.layers?1:0<BR>var ie4=document.all?1:0<BR>var
ns6=document.getElementById&&!document.all?1:0</p><p><BR>////////Code for
Netscape NS 4+////<BR>if (ns4){<BR>for (i=1;i<=25;i++)
{<BR>temp[i]=eval("document.p"+i+".clip")<BR>temp2[i]=eval("document.p"+i)<BR
>temp[i].width=window.innerWidth/5<BR>temp[i].height=window.innerHeight/5<BR
>}</p><p>for (i=1;i<=5;i++)<BR>temp2[i].left=(i-1)*temp[i].width</p><p>for
(i=6;i<=10;i++){<BR>temp2[i].left=(i-
6)*temp[i].width<BR>temp2[i].top=temp[i].height<BR>}</p><p>for (i=11;i<=15;i++)
{<BR>temp2[i].left=(i-
11)*temp[i].width<BR>temp2[i].top=2*temp[i].height<BR>}</p><p>for
(i=16;i<=20;i++){<BR>temp2[i].left=(i-
16)*temp[i].width<BR>temp2[i].top=3*temp[i].height<BR>}</p><p>for
(i=21;i<=25;i++){<BR>temp2[i].left=(i-
21)*temp[i].width<BR>temp2[i].top=4*temp[i].height<BR>}</p><p>}</p><p>functio
n erasecontainerns(){<BR>window.scrollTo(0,0)<BR>var
whichcontainer=Math.round(Math.random()*25)<BR>if
(whichcontainer==0)<BR>whichcontainer=1<BR>if (temp2[whichcontainer].visibility!
="hide")<BR>temp2[whichcontainer].visibility="hide"<BR>else{<BR>while
(temp2[whichcontainer].visibility=="hide")
{<BR>whichcontainer=Math.round(Math.random()*25)<BR>if
(whichcontainer==0)<BR>whichcontainer=1<BR>}<BR>temp2[whichcontainer].visibi
lity="hide"<BR>}</p><p>if
(counter==25)<BR>clearInterval(beginerase)</p><p>counter++<BR>espeed-
=10</p><p>}</p><p><BR>////////End code for NS 4+////////</p><p><BR>///////////Code
for IE 4+ and NS6/////////</p><p>if (ie4||ns6){<BR>var containerwidth=ns6?
parseInt(window.innerWidth)/5-3 : parseInt(document.body.clientWidth/5)<BR>var
containerheight=ns6?parseInt(window.innerHeight)/5-2 :
parseInt(document.body.offsetHeight/5)</p><p>for (i=1;i<=25;i++)
{<BR>temp[i]=ns6?document.getElementById("p"+i).style :
eval("document.all.p"+i+".style")<BR>temp[i].width=containerwidth<BR>temp[i].heig
ht=containerheight<BR>}</p><p>for (i=1;i<=5;i++)<BR>temp[i].left=(i-
1)*containerwidth</p><p>for (i=6;i<=10;i++){<BR>temp[i].left=(i-
6)*containerwidth<BR>temp[i].top=containerheight<BR>}</p><p>for (i=11;i<=15;i+
+){<BR>temp[i].left=(i-
11)*containerwidth<BR>temp[i].top=2*containerheight<BR>}</p><p>for
(i=16;i<=20;i++){<BR>temp[i].left=(i-
16)*containerwidth<BR>temp[i].top=3*containerheight<BR>}</p><p>for
(i=21;i<=25;i++){<BR>temp[i].left=(i-
21)*containerwidth<BR>temp[i].top=4*containerheight<BR>}<BR>}</p><p>function
erasecontainerie(){<BR>window.scrollTo(0,0)<BR>var
whichcontainer=Math.round(Math.random()*25)<BR>if
(whichcontainer==0)<BR>whichcontainer=1<BR>if (temp[whichcontainer].visibility!
="hidden")<BR>temp[whichcontainer].visibility="hidden"<BR>else{<BR>while
(temp[whichcontainer].visibility=="hidden")
{<BR>whichcontainer=Math.round(Math.random()*25)<BR>if
(whichcontainer==0)<BR>whichcontainer=1<BR>}<BR>temp[whichcontainer].visibili
ty="hidden"<BR>}</p><p>if (counter==25){<BR>clearInterval(beginerase)<BR>if
(ns6){<BR>for (i=1;i<26;i+
+)<BR>temp[i].display="none"<BR>}<BR>}<BR>counter++<BR>espeed-
=10</p><p>}</p><p>/////////End IE 4+ code////////</p><p>if
(ns4)<BR>beginerase=setInterval("erasecontainerns()",espeed)<BR>else if (ie4||ns6)
{<BR>beginerase=setInterval("erasecontainerie()",espeed)<BR>}</p><p><BR></scrip
t></p><p></body><BR></html>
Efecto barrido hacia arriba
<HTML><BR><HEAD><TITLE>Efecto
apertura</TITLE><BR></HEAD><BR><BODY bgColor=#ffffff leftMargin=0
rightMargin=0 topMargin=0></p><p><style><BR><!--
<BR>.curtain{<BR>position:absolute;<BR>left:0;<BR>top:0;<BR>layer-background-
color:004080;<BR>background-color:004080;<BR>border:0.1px solid
PURPLE<BR>}<BR>--><BR></style></p><p><div id="c1"
class="curtain"></div><div id="c2" class="curtain"></div><BR><script
language="JavaScript1.2"></p><p><BR>var speed=15<BR>var temp=new
Array()<BR>var temp2=new Array()<BR>if (document.layers){<BR>for (c=1;c<=2;c+
+)
{<BR>temp[c]=eval("document.c"+c+".clip")<BR>temp2[c]=eval("document.c"+c)<B
R>temp[c].width=window.innerWidth<BR>temp[c].height=window.innerHeight/2<BR
>temp2[c].top=(c-1)*temp[c].height<BR>}<BR>}<BR>else if (document.all)
{<BR>var curtainbottom=document.body.offsetHeight/2,curtaintop=0<BR>for
(c=1;c<=2;c++)
{<BR>temp[c]=eval("document.all.c"+c+".style")<BR>temp[c].width=document.body.
clientWidth<BR>temp[c].height=document.body.offsetHeight/2<BR>temp[c].top=(c-
1)*parseInt(temp[c].height)<BR>}<BR>}</p><p>function openit()
{<BR>window.scrollTo(0,0)<BR>if (document.layers){<BR>temp[1].bottom-
=speed<BR>temp[2].top+=speed<BR>if
(temp[1].bottom<=0)<BR>clearInterval(stopit)<BR>}<BR>else if (document.all)
{<BR>curtainbottom-=speed<BR>temp[1].clip="rect(0 auto+"+curtainbottom+"
0)"<BR>curtaintop+=speed<BR>temp[2].clip="rect("+curtaintop+" auto auto)"<BR>if
(curtainbottom<=0)<BR>clearInterval(stopit)<BR>}<BR>}<BR>function gogo()
{<BR>stopit=setInterval("openit()",60)<BR>}<BR>gogo()<BR></script><BR></body
><BR></html><BR>
<HTML><BR><HEAD><BR><TITLE>Crossbrowser
Zoomtext</TITLE><BR><meta name="Author" content="Thomas Brattli
(roskilde@bratta.com)"><BR><meta name="KeyWords" content="DHTML, HTML,
dhtml, html, demos, Javascript, VBscript, , Zoomtext, fadetext, Crossbrowser,
Netscape4.0, IE4.0, Internet explorer, Dynamic HTML"><BR><meta
name="Description" content="Crossbrowser Dynamic HTML zoomtext, fadetext,
change colors of text!!!"></p><p><script><BR>/* Este script fue hecho por Bratta en
www.bratta.com y puede ser usado<BR>gratuitamente siempre que se deje este mensaje
(en Ingles) intecto.<BR>Agradecere los enlaces a mi pagina</p><p>Si quiere que el
texto aparezca en otra parte de la pagina entonces<BR>modifique el estilo del
TAG.</p><p>Variables:<BR>Primero el texto: */<BR> text=new
Array('Bienvenidos','a el','Sitio','de','Gabriel Marcelo','Rodríguez')</p><p>// numero de
textos<BR> var numText=6<BR> <BR>// colores:<BR>// el primer colos sera
el color del texto cuando hace el zoom<BR> color=new
Array('#E8E8E8','#C2C2C2','#8E8E8E','#424242','#202020')<BR> <BR>// numero
de colores<BR> var numColors=5<BR> <BR>//tama¤o del zoom al
finalizar<BR> var endSize=70</p><p>//Velocidad del zoom (en
milisegundos)<BR> var Zspeed=30</p><p>//Velocidad de cambio en los
colores<BR> var Cspeed=200</p><p>//Fuente<BR> var font='Arial
Black'<BR> <BR>// Esconder el texto cuando acaba el zoom? (true o false)<BR>
var hide=true</p><p></p><p><BR>// Texto original</p><p>/*This script is made by
bratta at www.bratta.com and can be used freely<BR>as long as this msg is instact. I
would appriciate any links to my
page.</p><p>###########################################################
#############<BR>####################################################
####################<BR>#############################################
###########################<BR>If you want the text to appear differently on
anothe place on the page<BR>or anything set that in the style tag of the zoom layer.
</p><p>Here are the variables you have to set:<BR>First the text: (it will stop and
fade/change the colors on the last one)<BR> text=new
Array('www','bratta','com','www.bratta.com')<BR> <BR>set the number of
text's<BR> var numText=4<BR> <BR>Now the colors:<BR>all you have to
do is set the color you want to have in here: <BR>(the first color will be the color that
the text is when it zooms.)<BR> color=new
Array('#E8E8E8','#C2C2C2','#8E8E8E','#424242','#202020')<BR> <BR>set the
number of colors:<BR> var numColors=5<BR> <BR>set the size you want the
zoom to end at:<BR> var endSize=70</p><p>Set the speed you want it to zoom in
(in milliseconds)<BR> var Zspeed=30</p><p>Set the speed you want it too change
colors in<BR> var Cspeed=200</p><p>Set font<BR> var font='Arial
Black'<BR> <BR>do you want it to hide when its done? (true or false)<BR>
var hide=true<BR> <BR>You shouldn't really have to set anything below this
point<BR>#############################################################
#########<BR>########################################################
##############<BR>###################################################
###################*/</p><p></p><p>var size=10<BR>var
gonum=0<BR>/*Browsercheck and settings
vars<BR>##############################################################
########*/<BR>if (document.all) {<BR> n=0<BR> ie=1<BR>
zoomText='document.all.zoom.innerText=text[num]'<BR>
zoomSize='document.all.zoom.style.fontSize=size'<BR> closeIt=""<BR>
fadeColor="document.all.zoom.style.color=color[num]"<BR> }<BR>if
(document.layers) {<BR> n=1;ie=0<BR> zoomText=""<BR>
zoomSize="document.zoom.document.write('<p align=\"center\" style=\"font-
family:'+font+'; font-size:'+size+'px; color:'+color[0]+'\">'+text[num]+'</p>')"<BR>
closeIt="document.zoom.document.close()"<BR>
fadeColor="document.zoom.document.write('<p align=\"center\" style=\"font-
family:'+font+'; font-size:'+endSize+'px; color:'+color[num]+'\">'+text[numText-
1]+'</p>')"<BR> }</p><p>/*The functions for zooming
text.<BR>##############################################################
######*/<BR>function zoom(num,fn){<BR> if (size<endSize){<BR>
eval(zoomText)<BR> eval(zoomSize)<BR> eval(closeIt)<BR>
size+=5;<BR> setTimeout("zoom("+num+",'"+fn+"')",Zspeed)<BR> }
else{<BR> eval(fn);<BR> }<BR>}<BR>/*The functions for
fading/changing colors on
text<BR>##############################################################
######*/<BR>function fadeIt(num){<BR> if (num<numColors){<BR>
eval(fadeColor)<BR> eval(closeIt)<BR> num+=1;<BR>
setTimeout("fadeIt("+num+")",Cspeed)<BR> }else{<BR> hideIt()<BR>
}<BR>}<BR>/*This is the function that hides the layer after the zoom/color
change<BR>############################################################
########*/<BR>function hideIt(){<BR> if(hide){<BR>
if(ie)document.all.zoom.style.visibility="hidden"<BR>
if(n)document.layers.zoom.visibility="hidden"<BR> }<BR>}<BR>/*This is the
functions that calls the right function...or
something :}<BR>#######################################################
#############*/<BR>function init(){<BR> if(ie){<BR>
document.all.zoom.style.color=color[0]<BR>
document.all.zoom.style.fontFamily=font}<BR> go(0) <BR>}<BR>function
go(num){<BR> gonum+=1<BR> size=10<BR> if(num<numText){<BR>
zoom(num,'go('+gonum+')')<BR> }else{<BR> fadeIt(0)<BR> }
<BR>}<BR>//##########################################################
##########<BR></script><BR></HEAD><BR><BODY onload="init()"
bgcolor="Black" text="White" link="White"><BR><!-- Este es el zoom, para cambiar
la apariencia cambia el parametro<BR>que desees. Recuerda que solo puedes cambiar
width, top, height,<BR>left --><BR><div id="zoom" align="center" style="position:
absolute; top: 150; left: 12; width: 742; height:
19"></div></p><p><center><BR><H1>
</H1></p><p></center><BR></BODY><BR></HTML><BR>
<html>
</p><p><head><BR><title>Free JavaScripts provided by The JavaScript Source
</title><BR>
</head></p><p><BODY bgcolor="#000000"></p><p>
<SCRIPT LANGUAGE="JavaScript">
</p><p><!-- Begin<BR>text = "Gamarod Versión 2.0";
// The text to scroll<BR>color1 = "blue";
// original text color<BR>color2 = "white";
// new character color<BR>fontsize = "8";
// font size of text <BR>speed = 200;
// how fast to rotate to next character <BR>
// time is in milliseconds, (i.e. 1000 = 1 second)</p><p>i = 0;
<BR>if (navigator.appName == "Netscape") {<BR>document.write("<layer id=a
visibility=show></layer><br><br><br>");<BR>
}
<BR>else {<BR>document.write("<div id=a></div>");<BR>}<BR>function
changeCharColor() {<BR>if (navigator.appName == "Netscape")
{<BR>document.a.document.write("<center><font size =" + fontsize + "><font color="
+ color1 + ">");
<BR>for (var j = 0; j < text.length; j++) {<BR>if(j == i)
{<BR>document.a.document.write("<font color=" + color2 + ">" + text.charAt(i) +
"</font>");<BR>
}
<BR>else {<BR>document.a.document.write(text.charAt(j));
<BR> }
<BR>}<BR>document.a.document.write('</font></font></center>');<BR>document.a.
document.close();
<BR>}<BR>if (navigator.appName == "Microsoft Internet Explorer") {<BR>str =
"<center><font size=" + fontsize + "><font color=" + color1 + ">";
<BR>for (var j = 0;
j < text.length; j++) {<BR>if( j == i) {<BR>str += "<font color=" + color2 + ">" +
text.charAt(i) + "</font>";
<BR>
}
<BR>else {<BR>str += text.charAt(j);<BR> }<BR>}<BR>str +=
"</font></font></center>";
<BR>a.innerHTML = str;
<BR>}<BR>(i == text.length) ? i=0 : i++;
// reset after going through all letters<BR>}<BR>setInterval("changeCharColor()",
speed);
<BR>
// End -->
<BR></script></p><p><p></p><p></body></p><p></html><BR>
Efecto degrada
<html><BR><head><BR><title>Degradee</title><BR></head><BR><script
LANGUAGE="JavaScript"><BR><!--<BR>function toHex(dec) {<BR>var
hexCharacters = "0123456789ABCDEF"<BR>if (dec < 0)<BR>return "00"<BR>if
(dec > 255)<BR>return "FF"<BR>var i = Math.floor(dec / 16)<BR>var j = dec %
16<BR>return hexCharacters.charAt(i) + hexCharacters.charAt(j)<BR>}<BR>function
setbgColor(red, green, blue) {<BR>document.bgColor = "#" + toHex(red) +
toHex(green) + toHex(blue)<BR>}</p><p>function fade(sred, sgreen, sblue, ered,
egreen, eblue, step) {</p><p>for(var i = 0; i <= step; ++i) {<BR>// set current red
descriptor<BR>var red = Math.floor(sred * ((step - i) / step) + ered * (i / step))<BR>//
set current green descriptor<BR>var green = Math.floor(sgreen * ((step - i) / step) +
egreen * (i / step))<BR>// set current blue descriptor<BR>var blue = Math.floor(sblue *
((step - i) / step) + eblue * (i / step))<BR>// set background color according to
descriptors<BR>setbgColor(red, green, blue)<BR>}<BR>}<BR>//
--><BR></script></p><p><BR><body bgcolor="#FFFFFF" text="#000000"
bgcolor="#000000" link="#3870FF" vlink="#3870FF"<BR>alink="#3870FF"
onLoad="fade(255, 255, 255, 0, 50, 150, 32)"<BR>onUnload="fade(0, 65, 150, 255,
255, 255, 32)" bgproperties="fixed"><BR></body><BR></html></p><p>
};
1. En el panel Biblioteca, haga clic con el botón derecho del ratón en el símbolo MCTrio y
seleccione Vinculación en el menú contextual.
Los clips de película que se exportan para usarlos con ActionScript se cargan, de forma
predeterminada, antes del primer fotograma del archivo SWF que los contiene. Esto puede
producir cierta demora en la reproducción del primer fotograma. Cuando se asigna un
identificador de vinculación a un elemento, puede especificar que el clip de película se
cargue en el primer fotograma para evitar demoras de reproducción.
Uso del método attachMovie() para reproducir un clip de película
Ahora utilizará el método attachMovie() para cargar el clip de película y proporcionar un nombre
de instancia al símbolo. Puesto que la instancia del símbolo no existe en el escenario, creará el
nombre de instancia mediante programación.
2. En el panel Script del panel Acciones, coloque el punto de inserción al final de la última
línea de código. Presione Intro o Retorno y, a continuación, escriba lo siguiente para
añadir un comentario y crear una función:
3. //la función reproduce trio_mc cuando se libera la instancia
attachMovie_btn.
4. attachMovie_btn.onRelease = function(){
Además, aunque no haya colocado una instancia del símbolo MCTrio en el escenario,
utilizará ActionScript para crear un nombre de instancia para el símbolo. El nombre de
instancia que especificará es trio_mc.
5. Con el punto de inserción al final de la última línea del script, presione Intro o Retorno. A
continuación, escriba lo siguiente:
El número 1 del script que acaba de escribir hace referencia a la profundidad de la capa en
la que debe reproducirse el clip de película.
Cada instancia de clip de película tiene su propio eje z (profundidad) que determina el
orden de apilamiento de un clip de película dentro del archivo SWF o del clip de película
del que depende. Cuando se crea un nuevo clip de película en tiempo de ejecución con el
método attachMovie(), siempre se especifica una profundidad para el nuevo clip como un
parámetro del método.
Para obtener más información sobre el método attachMovie(), consulte attachMovie()
en el Diccionario de ActionScript de la Ayuda.
Presione Intro o Retorno después de la última línea del panel Script y escriba lo siguiente:
trio_mc._x = 275;
trio_mc._y = 200;
};