# Percent loaded of two SWFS

**URL:** <https://forum.kirupa.com/t/percent-loaded-of-two-swfs/264540>\
**Category:** flash\
**Created:** [June 27, 2008, 12:01am UTC](https://forum.kirupa.com/t/percent-loaded-of-two-swfs/264540 "2008-06-27T00:01:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 27, 2008, 12:01am UTC](https://forum.kirupa.com/t/percent-loaded-of-two-swfs/264540/1 "2008-06-27T00:01:10Z")

</div>

Hi,  
I was wondering if it was possible to have a preloader display the %loaded of both of them…I load two swfs at one time…a background swf and the swf that sits on top of the background. Right now I have a preloader on just the foreground swf which works fine. Can I make it so it displays the progress for both?

```auto

__slideLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
__slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);

```

…

```auto

		private function loadProgress(event:ProgressEvent):void
		{
			var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
			percentLoaded = Math.round(percentLoaded * 100);
			pcttxt.text = percentLoaded + "%";
		}
		private function loadComplete(event:Event):void
		{
			trace("Complete");
		}

```

my other loader would be \_\_bgLoader

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 27, 2008, 2:11am UTC](https://forum.kirupa.com/t/percent-loaded-of-two-swfs/264540/2 "2008-06-27T02:11:49Z")

</div>

just add together both event.bytesLoaded and bytesTotal.

---

<div class="post-metadata">

**Author:** ![dthought](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dthought/32/3573_2.png) [@dthought](https://forum.kirupa.com/u/dthought)\
**Post date:** [June 27, 2008, 2:47am UTC](https://forum.kirupa.com/t/percent-loaded-of-two-swfs/264540/3 "2008-06-27T02:47:05Z")

</div>

Or use BulkLoader. It’s super-awesome! 😃

[http://code.google.com/p/bulk-loader/](http://code.google.com/p/bulk-loader/)

---

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [June 27, 2008, 3:09am UTC](https://forum.kirupa.com/t/percent-loaded-of-two-swfs/264540/4 "2008-06-27T03:09:12Z")

</div>

But would they be using the same function?

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 27, 2008, 3:10am UTC](https://forum.kirupa.com/t/percent-loaded-of-two-swfs/264540/5 "2008-06-27T03:10:52Z")

</div>

[QUOTE=dthought;2350005]Or use BulkLoader. It’s super-awesome! 😃

[http://code.google.com/p/bulk-loader/[/QUOTE]](http://code.google.com/p/bulk-loader/%5B/QUOTE%5D)

That looks pretty crazy bloated. I’m sure the features are awesome, but that’s sort of the problem with catch-all classes like that, it’s bound to have features you don’t need.

---

<div class="post-metadata">

**Author:** ![dthought](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dthought/32/3573_2.png) [@dthought](https://forum.kirupa.com/u/dthought)\
**Post date:** [June 28, 2008, 2:36pm UTC](https://forum.kirupa.com/t/percent-loaded-of-two-swfs/264540/6 "2008-06-28T14:36:21Z")

</div>

> [@Anogar;2350010](#):
>
> but that’s sort of the problem with catch-all classes like that, it’s bound to have features you don’t need.

As with any classes, it’s always going to have things you may not need for any given project; but if that’s the logic, no-one should use Flint, Fisix, PaperVision etc. etc. etc. - the reality is that these classes may have a bit of overhead from doing a little more than any given project may need, but the benefits to having that functionality and easy of use are many 🙂

I’ve used BL for a number of AS3 jobs now, and it’s just made my life so much easier to load in multiple assets… you instantiate it, tell it what to load, tell it to go and wait for the results. It also simplifies instantiating data from different types - images, SWFs, sound etc. - again, some overhead, but making life so much easier 🙂

Anyway, I use it and really like it, your mileage may vary.
