Comunidad de diseño web y desarrollo en internet online

txtx externo símbolos % y +

Citar            
MensajeEscrito el 24 Ago 2009 11:29 am
Buenas, quería preguntar si alguien se ha encontrado con este problema: Estoy haciendo un scroll en flash que recibe texto desde diversos archivos txt. Estoy usando System.useCodepage = true; y texto.htmlText = true; y texto.html = true; además de probar a poner los txt en diferentes codificaciones (ANSI, Unicode, UTF). También estoy incorporando todos los glyphs necesarios. Y de ninguna de las maneras consigo que me represente lo siguiente:

1. El símbolo "+"
2. El símbolo "%"
3. Las etiquetas <b> y <strong> no funcionan (no puedo poner negritas)

Sin embargo, los <br> y los <u> funcionan perfectamente.

No sé si tiene que ver con la máscara del scroll (está hecha dinámicamente en lugar de convertir la capa a modo máscara) o simplemente es que no se puede hacer... También he probado a usar un styleSheet (para lo de la negrita) y tampoco ha funcionado.

Espero puedan ayudarme.
Saludos

Por kashino

8 de clabLevel



 

msie
Citar            
MensajeEscrito el 24 Ago 2009 12:58 pm
Hola. Mientras espero una respuesta a mi anterior pregunta me surgió una nueva duda: ¿Tienen los scrollers de flash una longitud máxima? Quiero decir, si tenemos un texto de más de, digamos 100 líneas... ¿flash corta el texto cuando llega a un tope de, por ejemplo, 80 líneas? Me está pasando esto mismo con un scroll que tengo al cual le estoy poniendo un texto (no es dinámico esta vez, es un texto que está dentro del archivo fla) y se trata de un texto muy largo... El caso es que algo más allá de la mitad del texto sale en el scroll, pero a la mitad deja de visualizarse texto, aunque la barra de scroll sigue dejandome bajar más. Es muy extraño. Estoy mirando el código del scroller y no veo donde puede estar el tope.

Otra cosa que no funciona aquí es el auto ajuste. Tiene un worWrap al final del código y no sirve para nada...:
Les pongo el código:

function scrolling(easing, auto, mouse) {
function updateContentPos() {
var _l1 = (dragger._y-btnup._y-btnup._height)/(scrollHeight-dragger._height);
contentMain.newY = Math.round(top_scroll-scrollable*_l1);
}
var moveSpeed = 2;
var easingSpeed = 6;
var scrollHeight = scrollbg._height;
var scrollable = contentMain._height-maskedView._height+2;
var top_scroll = contentMain._y;
var left = scrollbg._x-2;
var top = scrollbg._y;
var right = scrollbg._x-2;
var bottom = scrollbg._y+scrollbg._height-dragger._height;
if (scrollable<0) {
dragger._visible = false;
btnup._alpha = 0;
btndown._alpha = 0;
scrollbg._alpha = 0;
btnup.enabled = false;
btndown.enabled = false;
return (undefined);
}
contentMain.onEnterFrame = function() {
if (!easing || easing == undefined) {
this._y = this.newY;
} else {
this._y = this._y+(this.newY-this._y)/easingSpeed;
}
};
dragger.onPress = function() {
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
updateContentPos();
};
};
dragger.onRelease = dragger.onReleaseOutside=function () {
stopDrag();
delete this["onEnterFrame"];
};
btnup.onPress = function() {
this.onEnterFrame = function() {
dragger._y = Math.max(top, dragger._y-moveSpeed);
updateContentPos();
};
};
btnup.onRelease = function() {
delete this["onEnterFrame"];
};
btndown.onPress = function() {
this.onEnterFrame = function() {
dragger._y = Math.min(bottom, dragger._y+moveSpeed);
updateContentPos();
};
};
btndown.onRelease = function() {
delete this["onEnterFrame"];
};
updateContentPos();
if (auto == true) {
onEnterFrame = function () {
if (dragger._y<bottom) {
dragger._y = dragger._y+0.300000;
updateContentPos();
} else {
dragger._y = top;
}
};
}
if (mouseWheel == true) {
var _l2 = new Object();
_l2.onMouseWheel = function(delta) {
if (dragger._y<bottom) {
dragger._y = dragger._y+(delta+3);
updateContentPos();
} else {
dragger._y = bottom-3;
}
if (dragger._y>top) {
dragger._y = dragger._y+delta;
updateContentPos();
} else {
dragger._y = top;
}
};
Mouse.addListener(_l2);
}
if (mouseCoord == true) {
maskedView.onEnterFrame = function() {
if (this.hitTest(_xmouse, _ymouse, false)) {
dragger._y = _ymouse;
updateContentPos();
if (dragger._y>bottom) {
dragger._y = bottom;
updateContentPos();
}
}
};
}
if (barVisual == false) {
dragger._visible = false;
btnup._alpha = 0;
btndown._alpha = 0;
scrollbg._alpha = 0;
btnup.enabled = false;
btndown.enabled = false;
}
}
stop();
var easing = true;
var auto = false;
var mouseWheel = true;
var mouseCoord = false;
var barVisual = true;
var space = 5;
contentMain.content_mc.texto_txt.html = true;
contentMain.content_mc.texto_txt.multiline = true;
contentMain.content_mc.texto_txt.wordWrap = true;
contentMain.setMask(maskedView);
scrolling(easing, auto, mouseWheel, mouseCoord, barVisual);

Espero que alguien me saque de dudas si no de esta cuestion de la otra... Saludos!

Por kashino

8 de clabLevel



 

msie
Citar            
MensajeEscrito el 24 Ago 2009 05:17 pm
Bueno, por si a alguien más le pasa lo que a mí, la solución, al menos en cuanto al + y al %, está en este link:

http://www.cristalab.com/tutoriales/guia-de-loadvars-desde-acentos-a-bases-de-datos-c173l/

lo de la negrita sigue sin funcionar...

Por kashino

8 de clabLevel



 

msie

 

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