El codigo ÑAPA (resaca de sabado, como me aburro)

var texto_txt:TextField = this.createTextField('texto_txt'
,this.getDepth()-1 , mc._x, mc._y, mc._width, mc._height);
      texto_txt.multiline = true;
      texto_txt.border = false;
      texto_txt.selectable = false;

var formatoCajaTexto:TextFormat = new TextFormat();
      formatoCajaTexto.leading = -4;  // Este valor elimina el interlineado
de la fuente
      formatoCajaTexto.font = 'Verdana';
      formatoCajaTexto.size = 10;
      texto_txt.setTextFormat(myformat);


var tamano:Number = Number(formatoCajaTexto.size);
var valor:Number;
var numRetornosCarro:Number = mc._height / tamanoFuente;

for(var i:Number = 0;  i<=numRetornosCarro; i++){
    texto_mc.text += '\n';
}


Saludos, y arriba el tonopan!!!



----- Original Message ----- 
From: "Fobiaxx" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Lista dedicada a Actionscript" <[email protected]>
Sent: Saturday, September 23, 2006 4:13 PM
Subject: Re: [ASNativos] scroll textheight


Solo se me ocurre, ñapeando a muerte, Que dividas la altura del MC por el
tamaño de fuente del MC + 4 (El +4 varia algo dependiendo del interlineado
de la fuente) y el valor que te salga seran los retornos de carro que
tendras que insertar en el textField para que txt.textHeight = mc._height.

Es un ÑAPON que ni Benito y Compañia, pero deberia funcionarte.

Saludos.

----- Original Message ----- 
From: "lruiz " <[EMAIL PROTECTED]>
To: "Lista dedicada a Actionscript" <[email protected]>
Sent: Friday, September 22, 2006 11:37 AM
Subject: [ASNativos] scroll textheight



buenas a todos...

a ver si me podeis ayudar, me ha pasado un componente scroll, que solo
funciona con los textfield, y quiero utilizarlo tb para los MC

Para no tenerme que currar uno desde 0, se me ocurrio la pajilla mental...
de poner un campo de txt oculto con el mismo textheight que el MC, para
mover el mc al igual que el txt, pero como es logico no puedo decirle al
campo que textheight tiene... cosa que no sabia...

No se si este sera el mejor camino, si hay otra solución o currarme uno
desde 0...

una manita aunque sea al cuello...

gracias...






-----------------------------------------------------
ASNativos
www.5dms.com
subscripciones/desubscripciones
http://asnativos.5dms.com
-----------------------------------------------------


-----------------------------------------------------
ASNativos
www.5dms.com
subscripciones/desubscripciones
http://asnativos.5dms.com
-----------------------------------------------------


-----------------------------------------------------
ASNativos
www.5dms.com
subscripciones/desubscripciones
http://asnativos.5dms.com
-----------------------------------------------------

Responder a