You need to re-apply setTextFormat() every time you change the .text
or .htmlText properties of a text field:
<snip>
percent.text = percentNum;
percent.setTextFormat(ldrFormat);
<snip>
I tried this out with your code, and it worked fine afterwards.
Nathan
http://www.nathanderksen.com
On Feb 7, 2006, at 2:01 PM, Corban Baxter wrote:
Can anyone tell me why my text won't change in my percent.text
field that I am creating dynamicly...?
[code]
var ldrFormat:TextFormat = new TextFormat();
ldrFormat.color = 0x000000;
ldrFormat.font = "dirty_head";
ldrFormat.size = 69;
posX = 91;
posY = 0;
this.createTextField("percent", this.getNextHighestDepth(), posX,
posY, 1, 1);
percent.autoSize = true;
percent.text = "0";
percent.embedFonts = true;
percent.setTextFormat(ldrFormat);
trace("percent.posX: " + posX);
trace("percent.posY: " + posY);
percentIcon_mc.onEnterFrame = function(){
spacing = percent._width+93;
//trace(this.percent);
this._x = spacing;
//trace(_parent.spacing);
loaded = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
//trace(total);
//trace(loaded);
percentNum = Math.floor((loaded/total)*100);
//percentNum.toString();
percent.text = percentNum;
trace(percentNum);
}
stop();
[/code]
Corban Baxter | rich media designer |
www.funimation.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders