Is it possible to add kerning (letterspacing) in-between the numbers in a date counter?
For example lets say I have a date counter that counts the dates of a month (1,2,3,etc…) and I have two circles sitting side by side not overlapping. How would i go about adding a space in-between the numbers to have the number on the left in the left circle and the number on the right in the right circle? Someone mentioned using strings but how would I go about doing that?
Here is the current code that I am using:
Code:
onClipEvent (enterFrame) {
now = new Date();
nDate = now.getDate();
displayDate = nDate;
}
I did the same thing with my preloader so I will post the code for that, perhaps this code could be manipulated somehow to do the same to the date ticker.
stop();
this.onEnterFrame = function() {
var bytes_loaded:Number = Math.round(_root.getBytesLoaded());
var bytes_total:Number = Math.round(_root.getBytesTotal());
var getPercent:Number = bytes_loaded/bytes_total;
// Convert load percentage to a string to manipulate value
var percent:String = String(Math.round(getPercent * 28));
// If percent is less than 9 add a zero to fill the left circle
if(percent.length == 1) percent = "0" + percent;
// Split the number in half
var LPercent:String = percent.substr(0,1);// First number
var RPercent:String = percent.substr(1,2);// Second number
_root.loadPercentLeft.text = LPercent;// Left circle number
_root.loadPercentRight.text = RPercent;// Right circle number
// When the movie is loaded delete the enterFrame event and go to frame 3
if (bytes_loaded == bytes_total) {
delete this.onEnterFrame;
gotoAndPlay(2);
}
}
Any help would be appreciated!
Thank You.