Comunidad de diseño web y desarrollo en internet online

distintos tamaños de htmltext dentro de un mismo texto din.

Citar            
MensajeEscrito el 31 Mar 2006 06:29 am
estoy trayendo un texto desde un archivo .txt y fuenciona perfectamente:

Código :

texto.htmlText= "<b><u>"+titulo+"</b></u>"+"<br>"+descripcion;


ahora quiero que el titulo sea mas grande que la descripcion y con otro color, en teoria esto deberia funcionar:

Código :

texto.htmlText = "<b><u><font size=6 color=#FF0000>"+titulo+"</b></u></font>"+"<br>"+descripcion;


pero no funciona :crap: , cuando agrego font size y color ya ni siquiera me trae el texto

si alguien sabe cual es el problema o como se puede hacer esto (si es que se puede), le estaria muy agradecido.

muchas gracias :wink:

Por periclez

13 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 31 Mar 2006 09:16 am
hay que utilisar el objecto TextField.StyleSheet();
en el cual cargas un archive CSS por ejemplo :

Código :

/* CSS Document */
.titulo {
  color: #172E48;
  font-family: Arial,Helvetica,sans-serif;
  font-size: 13px;
  display: inline;
}
.headline {
   color: #000000;
   font-family: Arial,Helvetica,sans-serif;
   font-size: 15px;
   font-weight: bold;
   display: block;
   text-align: center;
   white-space: normal;
}


depues tu texto html sera de la siguiente manera :

Código :

"
   var mytextoHtml:String=<p class='titulo ' >tu titulo</p><p class='headline '>el  texto que quieras    introducir aqui</p>


y al final pones

Código :

//aca dices a tu textfield que tiene que utilisar el html
      tuTextField.html=true
//aca le dices al textfield cual css utilisar
      tuTextField.styleSheet = styles;
//aca le dices al textfield cual sera texto html a utilisar
       tuTextField.text = mytextoHtml;

Por geronimo

65 de clabLevel



Genero:Masculino  

mozilla

 

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