Comunidad de diseño web y desarrollo en internet online

Texto dinamico

Citar            
MensajeEscrito el 25 Abr 2006 11:13 am
Hola, estoy creando textos en mi página y no como hacer para crear párrafos o poner algunas palabras en negrita. El código que introduzco es éste:
var formato: TextFormat = new TextFormat();
with(formato){
font = "Arial";
size = "11";
align = "left"
}
_root.createTextField ("texto",0,170,90,350,200);
with (texto){
border = false;
wordWrap = 1;
textColor = "000000";
text=" <b>texto en negrita</b> <p aling='left'>nuevo párrafo</p> ";
}
texto.setTextFormat(formato);

Alguien sabe que es lo que estoy haciendo mal¿ porq el texto me sale con <b> y todo eso y no me convierte ningún texto en nebrita ni nada.

Gracias.

Por becruz

13 de clabLevel



 

firefox
Citar            
MensajeEscrito el 25 Abr 2006 01:57 pm
te falta activar el html en el texto dinamico y escribir con la propiedad htmlText

_root.createTextField ("texto",0,170,90,350,200);
with (texto){
border = false;
wordWrap = 1;
html = true;
textColor = "000000";
htmlText=" <b>texto en negrita</b> <p aling='left'>nuevo párrafo</p> ";
}
texto.setTextFormat(formato);


saludos

Por Maikel

BOFH

5575 de clabLevel

22 tutoriales
5 articulos

Genero:Masculino   Team Cristalab

Claber de baja indefinida

firefox
Citar            
MensajeEscrito el 25 Abr 2006 08:24 pm
Hola! Muchas gracias por responderme tan deprisa, el caso es que tu solucion me funciona para poner texto en negrita, pero para hacer parrafos no me hace nada. El codigo q le pongo es este, sabes que fallo cometo?

var formato: TextFormat = new TextFormat();
with(formato){
font = "Arial";
size = "11";
align = "left"
}
_root.createTextField ("texto",0,170,90,350,200);
with (texto){
border = false;
wordWrap = 1;
html = true;
textColor = "000000";
htmlText=" <p align='left'> Texto del nuevo parrafo </p> ";
}
texto.setTextFormat(formato);



Muchas gracias.

Por becruz

13 de clabLevel



 

firefox
Citar            
MensajeEscrito el 25 Abr 2006 09:57 pm
siguiendo el ejemplo de tu codigo anterior

Código :

htmlText=" <p><b>texto en negrita</b></p><p aling='left'>nuevo párrafo</p> ";


saludos

Por Maikel

BOFH

5575 de clabLevel

22 tutoriales
5 articulos

Genero:Masculino   Team Cristalab

Claber de baja indefinida

firefox

 

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