# Trouble with text property

**URL:** <https://forum.kirupa.com/t/trouble-with-text-property/315651>\
**Category:** Uncategorized\
**Created:** [November 1, 2010, 1:12am UTC](https://forum.kirupa.com/t/trouble-with-text-property/315651 "2010-11-01T01:12:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pxo](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@pxo](https://forum.kirupa.com/u/pxo)\
**Post date:** [November 1, 2010, 1:12am UTC](https://forum.kirupa.com/t/trouble-with-text-property/315651/1 "2010-11-01T01:12:32Z")

</div>

Hi I’m having some odd results trying to set the text property of a dynamic, classic text object I’ve created on the stage. I’m not getting any errors and it looks like it should work – it has before, and I don’t see what I’m doing differently. Somehow I can set it to “%” but not to “hello world” nor to the value Number variable used to report the loading progress…even when I cast it to String. Any one see what I’m doing wrong of some “known issue” regarding this? Here’s that code, too. I’m using Flash cs5, updated, on a mac OSx10.6.4

Thanks for your help!

* * *

[FONT=Arial]import flash.events.Event;

stop();

this.addEventListener(Event.ENTER\_FRAME, preloadHandler);

function preloadHandler(e:Event):void {  
trace(“tic”);

```
var myBytesLoaded:int = stage.loaderInfo.bytesLoaded;
var myBytesTotal:int = stage.loaderInfo.bytesTotal;
var decimalPercent:Number = myBytesLoaded / myBytesTotal;
var percent:Number = decimalPercent * 100;

preLoader.progressBar.scaleX = decimalPercent;
preLoader.txtPercent.text = (percent + "hello world " + "%");
trace(decimalPercent);

if (myBytesLoaded &gt;= myBytesTotal) {
    removeEventListener(Event.ENTER_FRAME, preloadHandler)
    gotoAndStop(2);
}

```

}[/FONT]
