Re: Re: [Flashcoders] math for getting textField's line number? ie height/(font.size+font.leading) ??

2006-11-04 Thread Jolyon Russ

Flash/CSS/Photoshop/et al accept negative values for leading and kerning.

0 is your baseline negative pulls tighter positive pushes looser.

On 11/3/06, Ray Chuan <[EMAIL PROTECTED]> wrote:

Hi,
are you sure negative leadings are allowed? I've tried and don't see
any difference.

I'm guessing lineCount should be an integer, so you should use:

Math.floor(ht/(size+leading))

Assuming leading>0.

On 11/3/06, grimmwerks <[EMAIL PROTECTED]> wrote:
> It's time for one of those brainfarts.
>
> I'm trying to position a textField's bottom in line with other
> textfields; I've added leading to all the textField's so my math is
> now off.
>
> All the single-line textFields are positioned properly, but the
> mutli-line textfields are not.
>
> In the one I'm testing out with, the font size is 30, and the leading
> is -10. So I did this:
>
> lineCount = (txt._height/(font.size + font.leading))
>
> This never works for my example, ie ht = 70, size = 30, leading = -10
>   ie  70/(30+-10) == 1.6
>
>
> What am I missing?
> ___
> 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
>


--
Cheers,
Ray Chuan
___
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] math for getting textField's line number? ie height/(font.size+font.leading) ??

2006-11-03 Thread Ray Chuan

Hi,
are you sure negative leadings are allowed? I've tried and don't see
any difference.

I'm guessing lineCount should be an integer, so you should use:

Math.floor(ht/(size+leading))

Assuming leading>0.

On 11/3/06, grimmwerks <[EMAIL PROTECTED]> wrote:

It's time for one of those brainfarts.

I'm trying to position a textField's bottom in line with other
textfields; I've added leading to all the textField's so my math is
now off.

All the single-line textFields are positioned properly, but the
mutli-line textfields are not.

In the one I'm testing out with, the font size is 30, and the leading
is -10. So I did this:

lineCount = (txt._height/(font.size + font.leading))

This never works for my example, ie ht = 70, size = 30, leading = -10
  ie  70/(30+-10) == 1.6


What am I missing?
___
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




--
Cheers,
Ray Chuan
___
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