# Loading XML and Stopping Line

**URL:** <https://forum.kirupa.com/t/loading-xml-and-stopping-line/247000>\
**Category:** flash\
**Created:** [December 17, 2007, 5:28pm UTC](https://forum.kirupa.com/t/loading-xml-and-stopping-line/247000 "2007-12-17T17:28:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wispas](https://avatars.discourse-cdn.com/v4/letter/w/9de0a6/32.png) [@wispas](https://forum.kirupa.com/u/wispas)\
**Post date:** [December 17, 2007, 5:28pm UTC](https://forum.kirupa.com/t/loading-xml-and-stopping-line/247000/1 "2007-12-17T17:28:51Z")

</div>

I have this code which is a preloader for the loader component on frame 1. However, is there a way to not start playing the timeline yet until the image has been loaded. I have a fade animation in frame 2 and the animation plays while the preloader is loading the image in frame 1. I do not want the timeline to play until the image is loaded. Any help?

```
myProgressBarListener = new Object();
myProgressBarListener = function (eventObject) {

    myProgressBar._visible = false;
};

imageLoader.scaleContent = true;
imageLoader.contentPath = "../images/commercial/images/commercial01.jpg";

myProgressBar.addEventListener("complete", myProgressBarListener);
myProgressBar.mode = "polled";

myProgressBar.source = "imageLoader";
myProgressBar.conversion = "1";

myProgressBar.label = "LOADING %3%%";
myProgressBar.direction = "right";
myProgressBar.labelPlacement = "bottom";
```
