Comunidad de diseño web y desarrollo en internet online

SWF Que empiece a reproducirse cuando cargue la pagina

Citar            
MensajeEscrito el 19 Jun 2007 08:28 am
Hola a toda la comunidad, voy a mostrar una animacion contenida en una capa en mi pagina, pero como no va ser loopiada sino que se reproducira una sola vez y luego se cerrara, necesito que la animacion comience cuando la pagina este cargada del todo. De que forma hago esto? . Gracias

Por hermix

25 de clabLevel



 

msie
Citar            
MensajeEscrito el 19 Jun 2007 09:29 am

Por One

Claber

1488 de clabLevel

5 tutoriales

Genero:Masculino  

Programador Web

firefox
Citar            
MensajeEscrito el 19 Jun 2007 10:45 pm
GRacias One, voy a leer el articulo y a implementarlo a ver si me funciona. Saludos

Por hermix

25 de clabLevel



 

msie
Citar            
MensajeEscrito el 19 Jun 2007 11:26 pm
Hola One, no lamentablemente no me funciono. Lo que quiero es que tan pronto se carge la pagina la animacion empieze a reproducirse. La animacion la tengo dentro de un layer asi:

Código :

<div id="theLayer" style="position:absolute;width:304px;left:187px;top:299px;visibility:visible">
<table border="0" width="250" cellspacing="0" cellpadding="5">
<tr>
<td width="100%">
  <table border="0" width="100%" cellspacing="0" cellpadding="0" height="36">
  <tr>
  <td>
    <div align="right"><a href="#" onClick="hideMe();return false"><font color=#000000 size=2 face=arial  style="text-decoration:none">cerrar</font></a>
      </div></td>
  </tr>
  <tr>
  <td width="100%" style="padding:4px" colspan="2">
<!-- PLACE YOUR CONTENT HERE //-->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="294" height="300">
  <param name="movie" value="flashes/bazar.swf">
  <param name="quality" value="high">
  <param name="wmode" value="transparent">
  <embed src="flashes/bazar.swf" width="294" height="300" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object></td>
<!-- END OF CONTENT AREA //-->
  </tr>
  </table> 
</td>
</tr>
</table></div>


Este codigo se complementa con este javascript:

Código :

<script language="JavaScript1.2">

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=isIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");

</script>


Ojala ud o alguien me pueda ayudar.

Por hermix

25 de clabLevel



 

msie

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.