I haven't used flash since Flash 5 and I just got MX 2004. I'm trying to make a preloader that loads external jpegs into a empty container with a action scripted percentage bar. I'm trying to make the preloader as simple as possible. Here is what I have so far but something is wrong I just can't see the problem.
--------------------------------------------------------------------------------------
• Code on _root

baseSize = container.getBytesTotal();

--------------------------------------------------------------------------------------
• Code on empty container

onClipEvent (load) {
loading = true;
}
onClipEvent (enterFrame) {
if (loading) {
if (this.getBytesTotal()>_root.baseSize) {
percent = this.getBytesLoaded()/this.getBytesTotal()*100;
trace (percent);
_root.loadingBar.bar._xscale = percent;
if (percent == 100) {
loading = false;
_root.loadingBar._visible = false;
}
}
}
}

--------------------------------------------------------------------------------------
•_code on loadingBar

onClipEvent (load) {
_visible=fasle;
}

--------------------------------------------------------------------------------------
• code on bar

onClipEvent (load) {
this._xscale = 0;
}

--------------------------------------------------------------------------------------

• code on the button

on (press) {
_root.container.loadMovie("external_image.jpg");
_root.loadingBar.bar._xscale = 0;
_root.loadingBar._visible = true;

--------------------------------------------------------------------------------------