# Swf preloader problems \[renamed\]

**URL:** <https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678>\
**Category:** Uncategorized\
**Created:** [April 15, 2006, 8:26am UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678 "2006-04-15T08:26:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadownetspy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/shadownetspy/32/1883_2.png) [@Shadownetspy](https://forum.kirupa.com/u/Shadownetspy)\
**Post date:** [April 15, 2006, 8:26am UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/1 "2006-04-15T08:26:00Z")

</div>

Hello, everyone!

I’ve been struggling with this for quite some time now, and desperately need some help…please. I’m simply trying to have a preloader bar (which is it’s own .swf) **load an external .swf** , and then ACTUALLY show how much it’s loaded with the bar! Here’s my problems:

(1) When previewing the preloader in Flash, the preloader just goes straight to 100%, then loads the movie (even when enabling “show streaming”)

(2) When I upload the file, it doesn’t come up with the preloader, but rather just a white screen (which loads normally).

So here’s my actionscript that I have on the first and only keyframe of my preloader .swf:

**stop();**  
\*\*bytes\_loaded = Math.round(this.getBytesLoaded(“Main Page.swf”)); \*\*  
\*\*bytes\_total = Math.round(this.getBytesTotal(“Main Page.swf”)); \*\*  
\*\*getPercent = bytes\_loaded/bytes\_total; \*\*  
\*\*this.loadText = Math.round(getPercent\*100); \*\*  
\*\*if (bytes\_loaded == bytes\_total) { \*\*  
\*\*this.loadMovie(“Main Page.swf”); \*\*  
**}**

Can someone at least _steer_ me in the right direction? Thank you very much!

-Shadownetspy

---

<div class="post-metadata">

**Author:** ![Shadownetspy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/shadownetspy/32/1883_2.png) [@Shadownetspy](https://forum.kirupa.com/u/Shadownetspy)\
**Post date:** [April 15, 2006, 10:07pm UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/2 "2006-04-15T22:07:54Z")

</div>

Okay, so I changed out my actionscript, and it seems to be working decently, however, the bar now grows, then jumps to its full length randomly. It should just grow, and stay at its position until it grows some more. Here’s the actionscript I have on my preloader bar movieclip:

```auto
onClipEvent (load) {
 loadMovieNum("site.swf", 1);
}
onClipEvent (enterFrame) {
  Total = Math.floor(_level1.getBytesTotal()/100)+(_root.getBytesTotal()/100);
 Loaded = Math.floor(_level1.getBytesLoaded()/100)+(_root.getBytesLoaded()/1000);
 Percent = Math.floor((Loaded/Total)*100);
 setProperty(_root.bar, _xscale, Percent);
 if (Percent == 100) {
  _level1.gotoAndPlay("One");
 }
}

```

If someone could just tell me how to fix this jumping problem, I’ll be set. 😉 Thanks again in advance!

-Shadownetspy

---

<div class="post-metadata">

**Author:** ![Shadownetspy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/shadownetspy/32/1883_2.png) [@Shadownetspy](https://forum.kirupa.com/u/Shadownetspy)\
**Post date:** [April 16, 2006, 12:48am UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/3 "2006-04-16T00:48:50Z")

</div>

PLEEASE!!! Someone, I need your help A.S.A.P!!!

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [April 16, 2006, 5:26am UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/4 "2006-04-16T05:26:07Z")

</div>

Don’t crosspost, I’ve deleted your thread in the AS forum :cool:

In the first frame:

```auto
stop();
loadMovieNum("site.swf", 1);
_root.bar._xscale =0;
this.onEnterFrame = function() {
	var total = _level1.getBytesTotal()+this.getBytesTotal();
	var loaded = _level1.getBytesLoaded()+this.getBytesLoaded();
	var percent = Math.floor((loaded/total)*100);
	_root.bar._xscale = percent;
	if (_level1._width) {
		_level1.gotoAndPlay("One");
		delete this.onEnterFrame;
	}
};

```

scotty(-:

---

<div class="post-metadata">

**Author:** ![Shadownetspy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/shadownetspy/32/1883_2.png) [@Shadownetspy](https://forum.kirupa.com/u/Shadownetspy)\
**Post date:** [April 16, 2006, 7:29pm UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/5 "2006-04-16T19:29:20Z")

</div>

Hey, Scotty:

Sorry about the crosspost. And about your help with my problem: …I think I love you…

-Shadownetspy

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 16, 2006, 9:45pm UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/6 "2006-04-16T21:45:17Z")

</div>

Shadow are you a female??

---

<div class="post-metadata">

**Author:** ![Shadownetspy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/shadownetspy/32/1883_2.png) [@Shadownetspy](https://forum.kirupa.com/u/Shadownetspy)\
**Post date:** [April 17, 2006, 3:05am UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/7 "2006-04-17T03:05:27Z")

</div>

Haha! No, it was a joke. I was just very thankful. Just a joke… By the way, the preloader works now, but when it’s done loading, it loads a blank page, as if it didn’t load the entire movie all of the way. Go to [www.sonicallstars.net](http://www.sonicallstars.net), and you’ll see what I’m talking about. Any ideas anyone?

Thanks,  
-Shadownetspy

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [April 17, 2006, 5:31am UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/8 "2006-04-17T05:31:26Z")

</div>

Post your fla’s?

scotty(-:

---

<div class="post-metadata">

**Author:** ![Shadownetspy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/shadownetspy/32/1883_2.png) [@Shadownetspy](https://forum.kirupa.com/u/Shadownetspy)\
**Post date:** [April 17, 2006, 7:08pm UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/9 "2006-04-17T19:08:46Z")

</div>

Both of my .fla’s are 2 big sorry. But if you have any questions, feel free to ask me, because I would like to get this figured out A.S.A.P. Thanks. I appreciate your help this far.

-Shadownetspy

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [April 18, 2006, 6:24am UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/10 "2006-04-18T06:24:19Z")

</div>

Without seeing your fla’s it’s hard to say what’s wrong, the code worked over here. Can’t you upload them to your server?

scotty(-:

---

<div class="post-metadata">

**Author:** ![Shadownetspy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/shadownetspy/32/1883_2.png) [@Shadownetspy](https://forum.kirupa.com/u/Shadownetspy)\
**Post date:** [April 18, 2006, 7:02am UTC](https://forum.kirupa.com/t/swf-preloader-problems-renamed/185678/11 "2006-04-18T07:02:02Z")

</div>

Yeah, Scotty. I’ll have to do that later on tomorrow. Check back, if you could, for an update. Thanks so much 4 your help. Also, is there a way I can send you the file privately so that no one tries to steal this file or anything?
