Comunidad de diseño web y desarrollo en internet online

Header en Flash

Citar            
MensajeEscrito el 11 Feb 2009 06:01 pm
He creado un header y quisiera que solo en el index.html empezara por el fotograma 1, pero en los otros enlaces
el header se posiconara en último fotograma.
He puesto en el primer fotograma este código:
function checkSO()
{
// If a shared object called siteSO already exists this will retrieve it otherwise it
// creates a new shared object called siteSO
var SO = SharedObject.getLocal("siteSO");
if(SO.data.visitedAlready)
{
gotoAndPlay("end");
}
else
{
SO.data.visitedAlready = true;
SO.flush();
}
}
// Put that and this in the first keyframe of your movie, before the intro
checkSO();

He creado el últio fotograma la etiqueta "end".

En IExplorer funciona pero en Firefox no.
¿Alguien me puede ayudar?

Por alla71

3 de clabLevel



 

firefox
Citar            
MensajeEscrito el 11 Feb 2009 11:07 pm
Hola, mmm, yo creo que te conviene mejor pasarle una variable al swf desde html, que le diga en que fotograma debe inciar, por ejemplo en la pagina index.html embeber el swf de forma normal y en las siguientes deberias especificar algo asi:

Código :

header.swf?iniciar=end


o usar flashvars:

Código HTML :

<param name="flashvars" value="inciar=end">


Entonces en as tendrias que poner

Código ActionScript :

if(iniciar != undefined) gotoAndPlay( iniciar ); 


En la forma en que tu lo tienes, si entras a index.html, incia en el primer fotograma, si pasas a otro link, incia en el fotograma end, y si regresas a index.html, ya no incia en el primer fotograma sino en el fotograma end. Espero que esto te sirva. Suerte.

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

firefox

 

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