HI nik again, sorry but these code are of the help and I don't read it so much. 
These options are for a single-line textfield, that grows "infinitely". If you 
want to use multiline you must to set to "true"

With the autosize you have to take care because, they are a lot of bugs about 
this property of the TextFields.

I have to make my own function to autoadjust my textfield. It gets the width of 
the textfield, then It makes the autosize to "none", it sets the width, and 
sets the autosize to the param ("left" or "right") and it aligns the textfield 
again.

// Begin code
function autoadjustTXT(field:TextField, algnText:String){
        var wtext:Number;
        wtext = field._width;
        field.autoSize = "none";        
        field._width = wtext
        field.autoSize = algnText;
        field.align = algnText;
}
// End code

Daniel Portilla Heras
Dpto. Desarrollo
Virtual Training
TELECOR
Tlfno: 915970193 Ext. 5864 (corp: 315 5864)
[EMAIL PROTECTED]

 

-----Mensaje original-----
De: nik crosina [mailto:[EMAIL PROTECTED] 
Enviado el: miƩrcoles, 30 de mayo de 2007 16:48
Para: flashcoders@chattyfig.figleaf.com
Asunto: Re: [Flashcoders] dynamic text not wrapping

HI,

Danny, no I didn't set the wrap property explicitly in actionScript,
but only selected multiline (NOT 'multiline no wrap') in the
properties. I should mention that it is a dynamic textfield.

Daniel, why do I have to create it multiline and wrap = false, only to
set these properties to tru later on?

Will do some tests,

Thanks,
Nik

On 5/30/07, Daniel Portilla Heras <[EMAIL PROTECTED]> wrote:
> Hi Nik, you must to use dynamic texts build on the fly with actionscript.
>
> // Begin Code
> createTextField("my_txt", 1, 0, 0, 200, 20);
> with (my_txt) {
>   border = true;
>   borderColor = 0x000000;
>   multiline = false;
>   wordWrap = false;
>   autoSize = "none";
>   text = "this is my first text created dynamically, it's too large and don't 
> wrap with my textfield";
> }
> // End Code
>
> After this, if you can to set the width to 100px, you have to make it 
> multiline and wordWrapped, You'll have to set the height according to the 
> number of lines of scroll you have.
>
> This is only an idea, I supose that anyone can give you "another hand".
>
> Bye
>
>
> Daniel Portilla Heras
> Dpto. Desarrollo
> Virtual Training
> TELECOR
> Tlfno: 915970193 Ext. 5864 (corp: 315 5864)
> [EMAIL PROTECTED]
>
>
>
> -----Mensaje original-----
> De: nik crosina [mailto:[EMAIL PROTECTED]
> Enviado el: miƩrcoles, 30 de mayo de 2007 13:29
> Para: Flashcoders mailing list
> Asunto: [Flashcoders] dynamic text not wrapping
>
> HI guys,
>
> an easy one - I can't get a dynamic text filed to wrapp text around
> that I am asigning to it with:
>
> ' messBox_txt.text = "display this really looong sentence ..."; '
>
> Using Flash mx 2004 professional.
>
> Thanks!
>
> Nik
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>


-- 
Nik C
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to