Re: [Flashcoders] Center align multiline textfield?

2006-10-10 Thread mario
Call me silly (not to my face) but as far as I know autoSize works  
perfectly well on multiline textfields, the only caveat is that you  
actually have to write it properly


'autoSize' instead of 'autosize' (notice the capital 'S')

Keep in mind that with centered text the textfield will only size in  
the vertical not in the horizontal.



cheers,
mario



Quoting Jake Prime <[EMAIL PROTECTED]>:


Autosize doesn't work in multiline textfields. If you think about it,
when you set autosize to true (or "right" or "center") you are asking
Flash to shrink the textfield to the smallest size possible to fit the
text. This is fine in a single line textfield, but with a mulitline
field Flash won't know whether to make the field shorter, narrower or
a combination.

As Giles has mentioned, use TextFormat.align:

var format:TextFormat = new TextFormat();
format.align = "center";
subhead.setTextFormat( format );

Jake

On 10/10/06, Keith Reinfeld <[EMAIL PROTECTED]> wrote:

Blake,

Use the paragraph tag's align attribute:

htmlText='SI.com\'s Peter King says T.O. is going to explode
before long, but Dallas is tough enough to survive.';


-Keith
http://home.mn.rr.com/keithreinfeld



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Perdue,
Blake
Sent: Tuesday, October 10, 2006 10:26 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Center align multiline textfield?

I'm trying to get a multiline textfield to be center aligned. Here's the
code:

this.createTextField('subhead',20,1,435,434,200);

with (this.subhead) {

   html=true;

   embedFonts=true;

   selectable=false;

   wordWrap=true;

   multiline=true;

   autosize='center';

   htmlText='SI.com\'s Peter King says T.O. is going to explode
before long, but Dallas is tough enough to survive.';

}



The autosize seems to only work for single line textfields, not
multiline. Anyone know how to accomplish this? Thanks.



Blake Perdue | 212.522.1292 | AIM: blakepCNN



___
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


___
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


Re: [Flashcoders] Center align multiline textfield?

2006-10-10 Thread Jim Kremens

"Autosize doesn't work in multiline textfields"

Not true.  See example below...

 var tf:TextField = _root.createTextField("tf", 0, 200, 200, 200, 200);
 tf.wordWrap = true;
 tf.multiline = true;
 tf.autoSize = true;
 tf.text = "
laatpurus.Insem.Vivamusviverratellussitametlacus.Phasellusnecnibhvelpedeposuerevestibulum.Maurisdictumpellentesquesem.Nunctinciduntdignissimlorem.Curabiturgravidanequenontortor.Maecenasvulputatecursusfelis.Vestibulumpharetra.Sedinterdumloremataugue.Sednullasem
,mattisac,placerateu,laciniafaucibus,sapien.Suspendissetellusquam
,interdumvel,laoreeteu,malesuadaeu,elitLoremipsumdolorsitamet,
consectetueradipiscingelit.Aeneanultriciespurusetmagna.Nuncantelorem
,blanditvel,hendreritid,rhoncusnec,
lorem.Fuscemalesuadaest.Etiamegetnibh.Vivamusfermentumviverratortor.Nullamdiam.Donecauctor.Vestibulumlectusquam
,accumsana,vehiculaac,venenatisquis,metus.Quisquenonummy
,tortorseddignissimdignissim,nequeerosmalesuadavelit,
indictumduiligulaatpurus.Insem.Vivamusviverratellussitametlacus.Phasellusnecnibhvelpedeposuerevestibulum.Maurisdictumpellentesquesem.Nunctincidun
";

Jim Kremens
___
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


Re: [Flashcoders] Center align multiline textfield?

2006-10-10 Thread Jake Prime

Autosize doesn't work in multiline textfields. If you think about it,
when you set autosize to true (or "right" or "center") you are asking
Flash to shrink the textfield to the smallest size possible to fit the
text. This is fine in a single line textfield, but with a mulitline
field Flash won't know whether to make the field shorter, narrower or
a combination.

As Giles has mentioned, use TextFormat.align:

var format:TextFormat = new TextFormat();
format.align = "center";
subhead.setTextFormat( format );

Jake

On 10/10/06, Keith Reinfeld <[EMAIL PROTECTED]> wrote:

Blake,

Use the paragraph tag's align attribute:

htmlText='SI.com\'s Peter King says T.O. is going to explode
before long, but Dallas is tough enough to survive.';


-Keith
http://home.mn.rr.com/keithreinfeld



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Perdue,
Blake
Sent: Tuesday, October 10, 2006 10:26 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Center align multiline textfield?

I'm trying to get a multiline textfield to be center aligned. Here's the
code:

this.createTextField('subhead',20,1,435,434,200);

with (this.subhead) {

html=true;

embedFonts=true;

selectable=false;

wordWrap=true;

multiline=true;

autosize='center';

htmlText='SI.com\'s Peter King says T.O. is going to explode
before long, but Dallas is tough enough to survive.';

}



The autosize seems to only work for single line textfields, not
multiline. Anyone know how to accomplish this? Thanks.



Blake Perdue | 212.522.1292 | AIM: blakepCNN



___
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


___
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


RE: [Flashcoders] Center align multiline textfield?

2006-10-10 Thread Keith Reinfeld
Blake, 

Use the paragraph tag's align attribute: 

htmlText='SI.com\'s Peter King says T.O. is going to explode
before long, but Dallas is tough enough to survive.';


-Keith 
http://home.mn.rr.com/keithreinfeld 
 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Perdue,
Blake
Sent: Tuesday, October 10, 2006 10:26 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Center align multiline textfield?

I'm trying to get a multiline textfield to be center aligned. Here's the
code:

this.createTextField('subhead',20,1,435,434,200);

with (this.subhead) {

html=true;

embedFonts=true;

selectable=false;

wordWrap=true;

multiline=true;

autosize='center';

htmlText='SI.com\'s Peter King says T.O. is going to explode
before long, but Dallas is tough enough to survive.';

}

 

The autosize seems to only work for single line textfields, not
multiline. Anyone know how to accomplish this? Thanks.

 

Blake Perdue | 212.522.1292 | AIM: blakepCNN

 

___
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


RE: [Flashcoders] Center align multiline textfield?

2006-10-10 Thread Giles Taylor
Have you centred the text using TextFormat.align?

Giles 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Perdue,
Blake
Sent: 10 October 2006 16:26
To: Flashcoders mailing list
Subject: [Flashcoders] Center align multiline textfield?

I'm trying to get a multiline textfield to be center aligned. Here's the
code:

this.createTextField('subhead',20,1,435,434,200);

with (this.subhead) {

html=true;

embedFonts=true;

selectable=false;

wordWrap=true;

multiline=true;

autosize='center';

htmlText='SI.com\'s Peter King says T.O. is going to explode
before long, but Dallas is tough enough to survive.';

}

 

The autosize seems to only work for single line textfields, not
multiline. Anyone know how to accomplish this? Thanks.

 

Blake Perdue | 212.522.1292 | AIM: blakepCNN

 

___
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


[Flashcoders] Center align multiline textfield?

2006-10-10 Thread Perdue, Blake
I'm trying to get a multiline textfield to be center aligned. Here's the
code:

this.createTextField('subhead',20,1,435,434,200);

with (this.subhead) {

html=true;

embedFonts=true;

selectable=false;

wordWrap=true;

multiline=true;

autosize='center';

htmlText='SI.com\'s Peter King says T.O. is going to explode
before long, but Dallas is tough enough to survive.';

}

 

The autosize seems to only work for single line textfields, not
multiline. Anyone know how to accomplish this? Thanks.

 

Blake Perdue | 212.522.1292 | AIM: blakepCNN

 

___
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