# XML Portfolio ProgressBar Component works, but

**URL:** <https://forum.kirupa.com/t/xml-portfolio-progressbar-component-works-but/82060>\
**Category:** Uncategorized\
**Created:** [March 7, 2005, 3:27pm UTC](https://forum.kirupa.com/t/xml-portfolio-progressbar-component-works-but/82060 "2005-03-07T15:27:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmych](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@jimmych](https://forum.kirupa.com/u/jimmych)\
**Post date:** [March 7, 2005, 3:27pm UTC](https://forum.kirupa.com/t/xml-portfolio-progressbar-component-works-but/82060/1 "2005-03-07T15:27:19Z")

</div>

The progress bar is technically working, but it isn’t loading through the whole bar. Also, the text isn’t showing up.

Click on Drawings, then click on an image. It works, but not how it should.  
I think it is a problem with calling the xscale and text?

```auto

preloader.onEnterFrame = function() {
	l = image_mc.getBytesLoaded();
	t = image_mc.getBytesTotal();
	p = Math.round((l/t)*100);
	if (p != 100) {
		//then we are not fully loaded
		this._visible = true;
		this._xscale = p*100;
		this.text = p +'% loaded';
	} else {
		this._visible = false;
	}
};

```

here is the FLA file:  
[http://www.jchamorro.com/test/main.fla](http://www.jchamorro.com/test/main.fla)

site:  
[http://www.jchamorro.com/test/](http://www.jchamorro.com/test/)
