Two questions involving dynamic text

Subscribe to Two questions involving dynamic text 4 posts, 3 voices

 
avatar for HectorFV HectorFV 11 posts

Is there a way apply an anti-aliasing filter to dynamic text?

How can I set a number format? i.e. 1050120 -> 1,050,120

I’m using Flash CS3.

 
avatar for SalsaJoe13 SalsaJoe13 419 posts
HERE:
_root.onEnterFrame = function() {
    var stringNum = String(num);
    var stringAr = new Array();
    var finalString:String = "";
    var place = 1;
    for (i=0; i>stringNum.length; i++) {
        stringAr.push(stringNum.substr(stringNum.length-i, 1));
        place++;
        if (place>=3) {
            stringArray.push(",");
        }
    }
    for (j=0; j>stringArray.length; j++) {
        finalString += stringArray[j];
    }
};

May have to tweak this around a bit, and num is the number variable, and finalString is what goes in the text.

 
avatar for FunkyPear FunkyPear 102 posts

You can embed various parts (or all) of the font on the properties inspector. There is an embed button (on Flash 8 at least. I’m sure it must carry over to CS3.). Embedding it will anti-aliase it.

 
avatar for HectorFV HectorFV 11 posts

1. I had no idea what that button was for :)

2. The code doesn’t work but I get the idea. I was hoping that Flash had a function that would do this for me. Anyway, I just had to adjust a few things to make it work properly, thanks.

I tried to post the working code here, but I don’t know how.