Weird onEnterFrame problem: not updating dynamic text

I have been trying to figure this all day and cant really find anything like it on the internet so I was wondering if somebody can help me out.


ploaded.text = "test"
onEnterFrame = function () {
                    loaded = MP3ToPlay.getBytesLoaded();
                    total = MP3ToPlay.getBytesTotal();
                    var loadedP:Number = Math.round((loaded / total) * 100);
                    ploaded.text = loadedP.toString();
                    if (loadedP >= 100) {
                        MP3ToPlay.setVolume(startVolume);
                        MP3ToPlay.start();
                        ploaded.text = "";
                        onEnterFrame = null;
                    }

The previous code is kind of a preloader while loading an mp3 to a sound instance.
The problem I am having is that the dynamic textbox displays test and is not updated until the if condition is met.

It is supposed to show the percentage of the uploaded song but all I get is the test when loaded and later nothing when loaded >= 100 and ploaded.text = “”.

This line is being ignored completley but is showing up in the ouput box when doing a trace of ploaded.text:


ploaded.text = loadedP.toString();

:crying::crying::crying: