Comunidad de diseño web y desarrollo en internet online

Scroll horizontal texto más rapido

Citar            
MensajeEscrito el 11 Mar 2009 11:34 am
Buenas,

Tengo una duda y no se cómo solucionarla. En este scroll horizontal de texto necesito que el texto se mueva a mayor velocidad, pero no encuentro cómo hacerlo.


Código :

//Creamos los objetos que necesitamos
_root.news.createEmptyMovieClip("marque_mc", 0);
marque_mc.createTextField("marque_txt", 2, 0, 0, 18, 18);
formato_fmt = new TextFormat();

//Propiedades del clip contenedor
marque_mc._x = 1000;
marque_mc._y = 45;


//Propiedades del formato de texto
formato_fmt.font = "_sans";
formato_fmt.size = 11;
formato_fmt.color = 0xFFFFFF;

//Ponemos las propiedades del texto
marque_mc.marque_txt.autoSize = "left";
marque_mc.marque_txt.html = true;
marque_mc.marque_txt.selectable = false;

//Ponemos el texto
marque_mc.marque_txt.htmlText = "texto de prueba";
//Aplicamos el estilo
marque_mc.marque_txt.setTextFormat(formato_fmt);


ancho = marque_mc.marque_txt._width;


//Movimiento
marque_mc.onEnterFrame = function(){
   this._x--;
   
   if (this._x <= (ancho*-20)){
      this._x = 0;
   }
}


Merci por adelantado

Por damibjrs

53 de clabLevel



 

firefox
Citar            
MensajeEscrito el 11 Mar 2009 10:50 pm
Aqui:

Código ActionScript :

//Movimiento
marque_mc.onEnterFrame = function(){
   this._x += 10;
   
   if (this._x <= (ancho*-20)){
      this._x = 0;
   }
}


Suerte.

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

firefox
Citar            
MensajeEscrito el 12 Mar 2009 02:56 pm
graciassssss

Por damibjrs

53 de clabLevel



 

firefox
Citar            
MensajeEscrito el 12 Mar 2009 07:22 pm
woops era

Código :

this._x -= 10


Bueno de todas formas, creo que por ahi hice un escript basado en ese script que tienes, en el cual se podia ajustar la velocidad y la direccion de la marquesina, seria cuestion de usar el bucador. 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.