-
How2 Display large numbers
I am interested in showing large incrementing numbers. I actually need to show a number that decrements each second, but I am not interested in the details at this time. Here is what I have found that works a little...
-------------
script "When Movie starts"
var count = int;
createTextField("field",getNextHighestDepth(), 100,100,0,0);
field.autosize = "left";
script "On every frame"
count++;
field.text = count;
--------------
How do I make the numbers larger?
Thanks, JZ
-
One of the things I tried from an example I found was...
var count = int;
var big_numbers:TextFormat = new TextFormat();
big_numbers.size = 12;
big_numbers.bold = true;
big_numbers.font = "Arial";
big_numbers.color = 0xFF0000;
this.createTextField("field",getNextHighestDepth() ,100,100,0,0);
field.setNewTextFormat(big_numbers);
But I get an ERROR...
setNewTextFormat() is not a method of 'TextField' in 'show_count' on line 10 field.setNewTextFormat (big_numbers)
-
OK! I got it working.
-------------------------
script "When Movie starts"
-------------------------
// flash9 ver
var count = int;
var fld_score:TextField = new TextField();
fld_score.x = 10;
fld_score.y = 10;
fld_score.width = 100;
fld_score.height = 50;
fld_score.border = true;
addChild(fld_score);
// for flash 8, remove previous line and uncomment lines
// createTextField("fld_score",getNextHighestDepth(), fld_score.x,
// fld_score.y,fld_score.width,fld_score.height);
var txt_format:TextFormat = new TextFormat();
txt_format.font = "Arial";
txt_format.size = 30;
txt_format.bold = true;
txt_format.color = 0xFF0000;
fld_score.setTextFormat(txt_format);
-------------------------
script "On every frame"
-------------------------
count++;
txtfield.text = int(count/20);
Last edited by jwzumwalt; 04-29-2008 at 01:46 AM.
-
The above should read.... Sorry!
count++;
fld_score.text = int(count/20);
-
Senior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|