View Full Version : Dynamically Setting Font Size = Locked at 127 ?
Oenie
08-18-2002, 12:33 PM
I'm trying to set the size of some textfield in my movie dynamically during the running of the movie.
When i try and change the font size of these textfields BEFORE compilation, i can get sizes of up to 500 or more ...
When i try doing this AFTER compilation, textFormat and the likes, it seems Flash stops enlarging when it reaches a font size of 127.
I can't seem to find anything on a possible lock of this value ...
Any ideas ?? :confused: :confused:
farafiro
08-18-2002, 01:01 PM
What code u use??
Oenie
08-18-2002, 01:10 PM
Well ... i tried a bunch of ways ...
tempTextFormat = new TextFormat();
newTextSize = new Number(213 - (part1*16 + part2 - 102));
tempTextFormat.size = newTextSize;
tempTextFormat.color = RGB;
_root["label1"].setTextFormat(tempTextFormat);
In this example i'm generating a font size somewhere between
60 and 213 ... and everything above 127 doesn't get bigger ...
Any ideas ?
farafiro
08-18-2002, 01:20 PM
and from where u generate the part1&2 value
Oenie
08-18-2002, 01:22 PM
myColor = new Color ( _root["label1"].textColor );
part1 = new Number(5+Math.round(Math.random()*11));
if(part1 == 0)
{
part1 = 1;
}
if(part1 == 16)
{
part1 = 15;
}
part2 = new Number(5+Math.round(Math.random()*11));
if(part2 == 0)
{
part2 = 1;
}
if(part2 == 16)
{
part2 = 15;
}
var RGB = "0x" + part1.toString(16) + part2.toString(16) + part1.toString(16) + part2.toString(16) + part1.toString(16) + part2.toString(16);
...
Those values were generated to let the color of my font also change dynamically between shades of grey ...
farafiro
08-18-2002, 01:37 PM
I don't know where the pb is coming from but I can tell u that
there is nothing called new Number that's first (so u can simply say blah blah = Number(......))
and u can uyse else if within the if part of the color
Finaly, u just give time to flash to calculate the part value first then pass it to the other equations
oh, also u can use this for dynamicly random changing of colormyColor = Math.round(Math.random()*Math.pow(6,16))
//or
myColor = Math.round(Math.random()*0xffffff)
Oenie
08-18-2002, 01:49 PM
well ... flash actionscript dictionary DOES tell me about
myNumber = new Number(1234); :)
the fact that the if loops and such were crafted 'amateurly' is cause i'm not too familiar with the flash programming , the temperature was hot and a lot of distraction :D
thanks for the advice, too bad no solution for my real problem ;)
moock
05-28-2009, 06:53 PM
The font size limit is 127 for "normal" text fields, but there is no font size limit in Flash Player 10 and later for text that uses the FTE (Flash Text Engine). See:
http://www.moock.org/blog/archives/000284.html
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.