Buscar

Como puedo adaptar el codigo para Firefox


 
 Old 25 nov 2006, 10:45   #1 (permalink)  
Miembro activo
 
Avatar de Lunatik
 
Registrado: febrero 2005
Ubicación: en el piso
Mensajes: 140

Predeterminado Como puedo adaptar el codigo para Firefox

Hola:
El codigo que quiero adaptar es un menú en flash (creo), es este:
Cita:
<head><script>
<!-- Beginning of JavaScript -
var i_strength=0
var i_color=0
var max_strength=400
var shadowcolor=new Array()
shadowcolor[0]="FFFFFF"
shadowcolor[1]="EEEEEE"
shadowcolor[2]="DDDDDD"
shadowcolor[3]="CCCCCC"
shadowcolor[4]="BBBBBB"
shadowcolor[5]="AAAAAA"
shadowcolor[6]="999999"
shadowcolor[7]="888888"
shadowcolor[8]="777777"
shadowcolor[9]="666666"
shadowcolor[10]="555555"
shadowcolor[11]="444444"
shadowcolor[12]="333333"
shadowcolor[13]="222222"
shadowcolor[14]="111111"
shadowcolor[15]="000000"
shadowcolor[16]="000000"
shadowcolor[17]="000000"
shadowcolor[18]="000000"
shadowcolor[19]="000000"
shadowcolor[20]="000000"
shadowcolor[21]="000000"
shadowcolor[22]="000000"
shadowcolor[23]="000000"
shadowcolor[24]="000000"
var timer
var speed=20
var thisobj


function stopfilter(thisdiv){
if (document.all) {
i_strength=0
i_color=0
clearTimeout(timer)
thisobj=thisdiv
thisobj.style.filter=" "
}
}


function startfilter(thisdiv){
if (document.all) {
i_strength=0
i_color=0
clearTimeout(timer)
thisobj=thisdiv
morefilter()
}
}

function morefilter(){
if (i_strength <=max_strength) {
thisobj.style.filter="dropShadow(color="+shadowcol or[i_color]+", offx="+i_strength+",offy=0)"
i_strength=i_strength+20
i_color++
timer = setTimeout("morefilter()",speed)
}
else {
clearTimeout(timer)
lessfilter()
}
}

function lessfilter(){
if (i_strength >=0) {
thisobj.style.filter="dropShadow(color="+shadowcol or[i_color]+",offx="+i_strength+",offy=0)"
i_strength=i_strength-20
i_color--
timer = setTimeout("lessfilter()",speed)
}
else {
clearTimeout(timer)
makepause()
}
}

function makepause(){
timer = setTimeout("morefilter()",1000)
}

var isNav = (navigator.appName.indexOf("Netscape")!=-1)
var colors = new Array("FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF" ,"FFFFFF","FFFFFF","F9F9F9","F1F1F1","E9E9E9","E1E 1E1","D9D9D9","D1D1D1","C9C9C9","C1C1C1","B9B9B9", "B1B1B1","A9A9A9","A1A1A1","999999","919191","8989 89","818181","797979","717171","696969","616161"," 595959","515151","494949","414141","393939","31313 1","292929","212121","191919","111111","090909","0 00000")
var i = -37
var msg = 0



var linkto = new Array()
linkto[0]="Home"
linkto[1]="Animator"
linkto[2]="Multimedia"
linkto[3]="Platypus Web Builder"
linkto[4]="Draw Magic"
linkto[5]="Antechinus C# Editor"
linkto[6]="JavaScript"
linkto[7]="Media Editor"
linkto[8]="Email C Point"

function startStrobe(msgnum)
{msg=msgnum
strobeEffect(msg,-37)}

function strobeEffect(msgnum,i)
{msg=msgnum
if (i < 3
{starttable = "<table width=200><td><center><font color=" + colors[Math.abs(i)] + " size=+2>"
endtable = "</font></a></center></td></table>"
fulltable = starttable + linkto[msg] + endtable
j = i + 1
if(isNav)
{document.object0.document.write(fulltable)
document.object0.document.close()}
else {object0.innerHTML = fulltable}
}
else {return false}
setTimeout("strobeEffect(msg,j)",20)
}

<!--
//var d = (navigator.userAgent.indexOf("MSIE 5")>-1) ;

if (parent && parent.gal_main) parent.gal_main.location='online/?station=101';

var d =(parseInt(navigator.appVersion)>=4 && navigator.appName=="Microsoft Internet Explorer");

items=9 ;
fade_increment = new Array(items) ;
fade_present = new Array(items) ;
currentbranch=-1;
colordepth = new Array(10);
colordepth[0]="#707070";
colordepth[1]="#808080";
colordepth[2]="#909090";
colordepth[3]="#a0a0a0";
colordepth[4]="#b0b0b0";
colordepth[5]="#c0c0d0";
colordepth[6]="#d0d0d0";
colordepth[7]="#e0e0e0";
colordepth[8]="#f0f0f0";
colordepth[10]="#ffffff";
started=false ;
for (i=0;i<items;i++) {
fade_increment[i]=0;
fade_present[i]=0;
}

function s(item,statustext) {
window.status=(statustext?statustext:' ');
if (started && d) {
var curr=item;
fade_increment[curr]=(statustext?40:-7);
}
return true;
}

function fadeloop() {
rep="";
for (i=0;i<fade_increment.length;i++) {
rep+=" "+fade_present[i];
fade_present[i]+=fade_increment[i] ;
if (fade_present[i]>=100) {
fade_present[i]=100;
fade_increment[i]=0;
}
else if (fade_present[i]<=0) {
fade_present[i]=0;
fade_increment[i]=0;
}
if (document.all['i'+i]) document.all['i'+i].style.color=colordepth[Math.round(fade_present[i]/10)];
}
setTimeout('fadeloop()',50) ;
}

Yo confio en mi Hundix, P4 3GH 768 MB RAM
Lunatik is offline   Citar y responder
 
 Old 25 nov 2006, 10:47   #2 (permalink)  
Miembro activo
 
Avatar de Lunatik
 
Registrado: febrero 2005
Ubicación: en el piso
Mensajes: 140

Predeterminado Re: Como puedo adaptar el codigo para Firefox

y sigue
Cita:
function tog(b) {
if (d) {
if (currentbranch==b) {
document.all["s"+b].style.display='none';
currentbranch=-1;
} else {
if (currentbranch>-1) document.all["s"+currentbranch].style.display='none';
document.all["s"+b].style.display='block';
currentbranch=b;
}
}
}

function positionitems() {
for (a=0;a<items;a++) {
document.all["t"+a].style.top=a*10;
}
}

function start() {
// positionitems();
started=true ;
if (d) fadeloop() ;
}

function dropMenu() {
speed=5;
topdistance=100;
items=9;
y=-50;
ob=1;
if (navigator.appName == "Netscape") {
v=".top=",dS="document.",sD="";
}
else {
v=".pixelTop=",dS="",sD=".style";
}
}
function scrollItems() {
if (ob<items+1) {
objectX="object"+ob; y+=10; eval(dS + objectX + sD + v + y);
if (y<topdistance) setTimeout("scrollItems()",speed);
else y=-50, topdistance+=40, ob+=1, setTimeout("scrollItems()",speed);
}
}
// End -->
</SCRIPT></head>
<body onLoad="dropMenu(), scrollItems(), start();" BGCOLOR="Black" TEXT="white" link="white" vlink="white" alink="white">
<center>

<div id="object0" style="position:absolute; visibility:show; left:-22px; top:40px; z-index:2"></div>
<div id="object1" style="position:absolute; visibility:show; left:0px; top:-50px; z-index:2"
onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)">
<table border=0 width=150>
<td><center>
<div class=t id="t0" onmouseover="return s(0,'C Point home page')" onmouseout="return s(0)"><nobr>
<a href="http://www.c-point.com" class=mi id="i0" onmouseover="startStrobe(0)" target="_self">Home</a></nobr></div>
</center></td>
</table>
</div>
<div id="object2" style="position:absolute; visibility:show; left:0px; top:-50px; z-index:2" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)">
<table border=0 width=150>
<td><center>
<div class=t id="t1" onmouseover="return s(1,'Platypus Animator')" onmouseout="return s(1)"><nobr><a href="htp://www.c-point.com/animator.htm" class=mi id="i1" onmouseover="startStrobe(1)">Animator</a></nobr></div>
</center></td>
</table>
</div>
<div id="object3" style="position:absolute; visibility:show; left:0px; top:-50px; z-index:2" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)">
<table border=0 width=150>
<td><center>
<div class=t id="t2" onmouseover="return s(2,'Multimedia')" onmouseout="return s(2)"><nobr><a href="http://www.c-point.com/author.htm" class=mi id="i2" onmouseover="startStrobe(2)" target="_self">Multimedia</a></nobr></div>
</center></td></table>
</div>
<div id="object4" style="position:absolute; visibility:show; left:0px; top:-50px; z-index:2" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)">
<table border=0 width=150>
<td><center>
<div class=t id="t3" onmouseover="return s(3,'Platypus Web Builder')" onmouseout="return s(3)"><nobr><a href="http://www.c-point.com/webbuild.htm" class=mi id="i3" onmouseover="startStrobe(3)" target="_self">Web Builder</a></nobr></div>
</center></td>
</table>
</div>
<div id="object5" style="position:absolute; visibility:show; left:0px; top:-50px; z-index:2" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)">
<table border=0 width=150>
<td><center>
<div class=t id="t4" onmouseover="return s(4,'Antechinus Draw Magic')" onmouseout="return s(4)"><nobr><a href="http://www.c-point.com/drawmagic.htm" class=mi id="i4" onmouseover="startStrobe(4)" target="_self">Draw Magic</a></nobr></div>
</center></td>
</table>
</div>
<div id="object6" style="position:absolute; visibility:show; left:0px; top:-50px; z-index:2" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)">
<table border=0 width=150>
<td><center>
<div class=t id="t5" onmouseover="return s(5,'Antechinus C# Editor')" onmouseout="return s(5)"><nobr><a href="http://www.c-point.com/csharp.htm" class=mi id="i5" onmouseover="startStrobe(5)" target="_self">C# Editor</a></nobr></div>
</center></td>
</table>
</div>
<div id="object7" style="position:absolute; visibility:show; left:0px; top:-50px; z-index:2" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)">
<table border=0 width=150>
<td><center>
<div class=t id="t6" onmouseover="return s(6,'Antechinus JavaScript Editor')" onmouseout="return s(6)"><nobr><a href="http://www.c-point.com/pjedit.htm" class=mi id="i6" onmouseover="startStrobe(6)" target="_self">JavaScript</a></nobr></div>
</center></td>
</table>
</div>
<div id="object8" style="position:absolute; visibility:show; left:0px; top:-50px; z-index:2" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)">
<table border=0 width=150>
<td><center>
<div class=t id="t7" onmouseover="return s(7,'Antechinus Media Editor')" onmouseout="return s(7)"><nobr><a href="http://www.c-point.com/mediaed.htm" class=mi id="i7" onmouseover="startStrobe(7)" target="_self">Media Editor</a></nobr></div>
</center></td>
</table>
</div>
<div id="object9" style="position:absolute; visibility:show; left:0px; top:-50px; z-index:2" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)">
<table border=0 width=150>
<td><center>
<div class=t id="t8" onmouseover="return s(8,'Email C Point')" onmouseout="return s("><nobr><a href="mailto:c-point@c-point.com" class=mi id="i8" onmouseover="startStrobe(" target="_self">Email C Point</a></nobr></div>
</center></td>
</table>
</div>
</center>

</body>
Solo funciona en explorer
saludos

Yo confio en mi Hundix, P4 3GH 768 MB RAM
Lunatik is offline   Citar y responder
 
 Old 25 nov 2006, 21:41   #3 (permalink)  
Moderador
 
Avatar de the_ma3x
 
Registrado: febrero 2005
Ubicación: México
Mensajes: 4.325

Predeterminado Re: Como puedo adaptar el codigo para Firefox

MMmm...

Bueno, a ojo de buen cubero y viendo por encima el código no es flash, es javascript.

El mayor problema de estos scripts es que no son compatibles con los standares W3C. El problema no es tanto los scripts, sino que Internet explorer no cumple esos standares, entonces los programadores, para hacer compatibles sus códigos por el aún hoy más usado navegador (esperemos que no por mucho), adaptan sus códigos a internet explorer en vez de internet explorer adaptarse a los standares internacionales.

Pero bueno, el problema es que este script solo sirve en IE, para adaptarlo a firefox tendrías que modificar mucho, mucho código, o sea, hacer el menú desde 0.

Saludines

Every wall is a door. Ralph Waldo Emerson
the_ma3x is offline   Citar y responder
 
 Old 26 nov 2006, 14:17   #4 (permalink)  
Miembro activo
 
Avatar de Lunatik
 
Registrado: febrero 2005
Ubicación: en el piso
Mensajes: 140

Predeterminado Re: Como puedo adaptar el codigo para Firefox

Ok, muchas gracias, jeje, a quedado claro que no tengo ni p... idea de paginas web ni de flash , saludos

Yo confio en mi Hundix, P4 3GH 768 MB RAM
Lunatik is offline   Citar y responder

« Creacion pagina web | foro en dreamweaver »

Herramientas
Estilo


 

Tema Iniciado por Foro Respuestas Último mensaje
32 aplicaciones gratis para enseñarle nuevos trucos a la computadora joako9205 Software 3 17 jul 2009 09:38
Troyano para Firefox utiliza la ingeniería social para expandirse eire1281 Seguridad 0 06 ago 2006 08:51
posicionamiento en Google herlanz Internet 23 20 mar 2006 19:40
Cuando estoy bajando algo del eMule no puedo abrir las páginas NABUCODO P2P 25 08 nov 2005 16:33
Configuración del Naviscope para ADSL, para rayjoxe asb Internet 2 15 may 2005 17:54



Buscar