Foros del Web » Creando para Internet » Flash y Actionscript »

AS2 - textField TextHeigh _height valor real

Estas en el tema de AS2 - textField TextHeigh _height valor real en el foro de Flash y Actionscript en Foros del Web. Hola a todos!, queria ver si me pueden dar una mano. Estoy con una pelicula de flash en la que creo distintos mc con algunos ...
  #1 (permalink)  
Antiguo 18/08/2011, 06:23
Avatar de kesioo  
Fecha de Ingreso: enero-2007
Ubicación: Capital Federal, Argentina
Mensajes: 137
Antigüedad: 17 años, 3 meses
Puntos: 2
AS2 - textField TextHeigh _height valor real

Hola a todos!,

queria ver si me pueden dar una mano.
Estoy con una pelicula de flash en la que creo distintos mc con algunos textfield dentro. Estos se llenan con info desde un xml.

El problema, no puedo ordenar verticalmente el texto ya que tanto _height, como textHeight no me dan valores reales. Y ello, al darlo borde a las cajas de texto, veo que sucede porque hay un margen superior e inferior al texto, no asi izquierdo y derecho.

Los textfield tienen autosize true, lo que acorta el ancho, pero no se como hacerlo en la altura..

una imagen vale mas que mil palabras:
http://imageshack.us/photo/my-images/835/unled1nd.jpg/


el codigo que uso:
Código:
for (var i=0; i<(newsletters[target_mc.num].length-1); i++) {
		var txt_mc:MovieClip = target_mc.txt_mc.createEmptyMovieClip("txt"+i+"_mc", target_mc.txt_mc.getNextHighestDepth());
		var txt_txt:TextField = txt_mc.createTextField("texto_txt", txt_mc.getNextHighestDepth(), 0, 0, 1, 1);
		setTxt(txt_txt);
		if(i==0){
			txt_txt.setNewTextFormat(vagL);
		} else if (i > 3) {
			txt_txt.setNewTextFormat(vagB14);
			trace("adsad")
		} else {
			txt_txt.setNewTextFormat(vagB);
		}
		txt_txt.text = newsletters[target_mc.num][i+1];
	}
function setTxt(temp:TextField){
	temp.multiline = false;
	temp.wordWrap = false;
	temp.embedFonts = true;
	temp.autoSize = true;
	temp.condenseWhite = true;
	temp.border= true;
}
var vagB:TextFormat = new TextFormat();
vagB.font = "vagB";
vagB.size = 28;
vagB.letterSpacing = 0;
vagB.color = 0x000000;
var vagB14:TextFormat = new TextFormat();
vagB14.font = "vagB";
vagB14.size = 14;
vagB14.letterSpacing = 0;
vagB14.color = 0x000000;
var vagL:TextFormat = new TextFormat();
vagL.font = "vagL";
vagL.size = 14;
vagL.letterSpacing = 0;
vagL.color = 0x000000;
[/CODE]

alguna idea de como hacer esto?

Etiquetas: as2, flash, height, real, textfield, xml, clips
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:24.