Comunidad de diseño web y desarrollo en internet online

Botones raros en flash...

Citar            
MensajeEscrito el 25 May 2009 01:49 pm
Hola. Compré en Flashden un cacharro para hacer un menú que me gustó. Es sencillo de adjuntar a mi página. Mi problema viene porque quiero que, al presionar los botones, la película vaya a un fotograma concreto, no a una url. Sé que se puede porque lo pone en el código pero no había visto esto antes. Creo que debe ser sencillo. Os pongo el código (en las urls pongo la palabra "direcciónweb"):

Código :

// Setting the xml reference and starting the menu
a.descriptions=["ABOUT","PORTFOLIO","HISTORY","NEWS","CONTACT","BL OG"];
a.references=["1", "2", "3","direcciónweb", "direcciónweb", "some keyframe"];
a.targets=["","","","_blank","_blank",""];

a.startClip();

// This is the function that is executed when a button is pressed. The variable 'ref' and 'tgt'
// in this function will be set to the values that you've used in the XML file or arrays.
// You can add the right actions simply by having an if statement checking the values
this.goRef=function(ref,tgt){
trace("ref= "+ref);
if(ref=="1"){
trace("some movieclip go to frame 1");
}
if(ref=="2"){
trace("some movieclip go to frame 1");
}
if(ref=="3"){
trace("some movieclip go to frame 1");
}
if(ref=="direccióneb"){
trace("opening an URL");
getURL(ref,tgt);
}
if(ref=="some keyframe"){
trace("some movieclip go to some keyframe");
}
}

Por rgplanet

61 de clabLevel



 

safari
Citar            
MensajeEscrito el 25 May 2009 11:59 pm
deberias modificar las lineas

Código ActionScript :

trace("some movieclip go to frame 1");

por un

Código ActionScript :

 gotoAndPlay ("nombre del fotograma");
o lo que es lo mismo

Código ActionScript :

 gotoAndPlay (nro_fotograma); //este es un nro, y va sin comillas


Saludos

Por bubudrc

Claber

591 de clabLevel

1 tutorial

 

mayo 2006

firefox
Citar            
MensajeEscrito el 26 May 2009 02:17 pm
Gracias Gracias Gracias!!!

Por rgplanet

61 de clabLevel



 

safari

 

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