Comunidad de diseño web y desarrollo en internet online

news ticker vertical

Citar            
MensajeEscrito el 11 Ago 2009 03:06 pm
Hola Estoy buscando algun ejemplo en que muestre el actionscript de un news ticker vertical y que a su vez pueda cargar un .txt
Todos los que he encontrado son horizontales y dejan cargar un txt pero no dejan poder modificarlo, ya sea poniendole un color específico a un título y otro color al contenido.
Tengo un ejemplo de actionscript que encontre por ahí pero funcionaba de manera horizontal, yo traté de ponerlo vertical con el poco conocimiento que tengo del actionscript, pero no se en que estyo fallando... carga un txt al que sí se le puede poner cacarterísticas diferentes a cada letra y tambíen da la opción de poder darle un wordwrap.
Aquí va el código....
[color=#3465A4]System.useCodepage = true;
function newsticker(content, posX, posY, depth, tempo) {
this.loadVariables(content);
this.onData = function() {
createTextField("text",depth,posX,posY,150,20);
text.html = true;
text.htmlText = news;
text.selectable = false;
text.wordWrap = true;
text.autoSize = "left";

createTextField("text2",depth+1,posX,posY,150,200);
text2.html = true;
text2.htmlText = news;
text2.selectable = false;
text2.wordWrap = true;
text2.autoSize = "left";

text2._y = text._width;
function tick() {
text._y -= tempo;
text2._y -= tempo;
if (text2._y<=posY) {
text._y = posY;
text2._y = text._width+posY;
}
updateAfterEvent();
}
setInterval(tick,60);
};
}
newsticker("ticker.txt",2,-5,2,2);
[/color]
y aquí va el contenido del txt... puse cualquier texto... =) es sólo relleno!

[img][/img]news=
<font color="#000000" face="Verdana" size="10"> Actividades AGOSTO <b> FUTBOL </b> a><font color="#FF9900">25 de Agosto</font></a>
Estadio español vsClub Médico.[<a href="http://www.flashstar.de" target="_blank">
<b> NATACION </b> <br>
13 de agosto<font color="#FF9900">Flashstar.de</font></a>]
<font color="#000000" face="Verdana" size="10"> Actividades AGOSTO <b> TENIS </b> a><font color="#FF9900">25 de Agosto</font></a>
Estadio español vsClub Médico.[<a href="http://www.flashstar.de" target="_blank">
<b> BALLET</b> <br>
13 de agosto _______________<font color="#FF9900"></font></a>]


Por fa si alguien me pudiera ayudar, gracias!

Por Magax

3 de clabLevel



 

msie7
Citar            
MensajeEscrito el 12 Ago 2009 08:50 pm
Le hice una corrección, pero aun no logro controlarlo bien, al menos ahora no se montan los textos uno sobre otro...
Si alguien me pudiera dar una mano al repecto...

GRACIAS!!

System.useCodepage = true;
function newsticker(content, posX, posY, depth, tempo) {
this.loadVariables(content);
this.onData = function() {
createTextField("text",depth,posX,posY,150,0);
text.html = true;
text.htmlText = news;
text.selectable = false;
text.wordWrap = true;
text.autoSize = "left";

createTextField("text2",depth+1,posX,posY,150,0);
text2.html = true;
text2.htmlText = news;
text2.selectable = false;
text2.wordWrap = true;
text2.autoSize = "left";

text2._y = text._height;
function tick() {
text._y -=tempo;
text2._y -=tempo;
if (text2._y<=posY) {
text._y = posY;
text2._y = text._height+posY;
}
updateAfterEvent();
}
setInterval(tick,60);
};
}
newsticker("ticker.txt",2,-5,1,1);

Por Magax

3 de clabLevel



 

msie7

 

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