# Preloader text w/ pie preloader

**URL:** <https://forum.kirupa.com/t/preloader-text-w-pie-preloader/9150>\
**Category:** Uncategorized\
**Created:** [December 5, 2002, 9:25pm UTC](https://forum.kirupa.com/t/preloader-text-w-pie-preloader/9150 "2002-12-05T21:25:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)\
**Post date:** [December 5, 2002, 9:25pm UTC](https://forum.kirupa.com/t/preloader-text-w-pie-preloader/9150/1 "2002-12-05T21:25:15Z")

</div>

i’m using the script that i modified from sbeener’s pie preloader.

here’s the code i have

```auto

MovieClip.prototype.drawMeter = function(t,l){
   var p = l/t;
   var r = 16;
   var v = [[r,-r],[r,r],[-r,r],[-r,-r]];
   var d = Math.ceil(p*4);
   var s = this.getProgress(p);
   with(this){
       clear();
      beginFill(0x560000);
      lineTo(0,-r);
      for(var i=0;i < d;i++){
         lineTo(v*[0],v*[1]);
      }
      lineTo(s.x,s.y);
      endFill();
	  // in drawMeter()
   if(t == l){
      // when loaded actions
      _root.nextFrame();
   }
   }
}

MovieClip.prototype.getProgress = function(p){
   var r = 20;
   var s = Math.PI + (-p * Math.PI*2);
   return({y:Math.cos(s)*r,x:Math.sin(s)*r});
}

MovieClip.prototype.drawCircle = function(r, x, y){
      this.moveTo(x+r, y);
      this.curveTo(r+x, -0.4142*r+y, 0.7071*r+x, -0.7071*r+y);
      this.curveTo(0.4142*r+x, -r+y, x, -r+y);
      this.curveTo(-0.4142*r+x, -r+y, -0.7071*r+x, -0.7071*r+y);
      this.curveTo(-r+x, -0.4142*r+y, -r+x, y);
      this.curveTo(-r+x, 0.4142*r+y, -0.7071*r+x, 0.7071*r+y);
      this.curveTo(-0.4142*r+x, r+y, x, r+y);
      this.curveTo(0.4142*r+x, r+y, 0.7071*r+x, 0.7071*r+y);
      this.curveTo(r+x, 0.4142*r+y, r+x, y);
}

this.createEmptyMovieClip("loader",0);
this.createEmptyMovieClip("mask",1);
this.mask.beginFill(0xfeefff);
this.mask.drawCircle(16,0,0);
this.mask.endFill();
this.loader.setMask(this.mask);

loader.onEnterFrame = function(){
   if((i++) < 100){
      this.drawMeter(100,i);
   }
}
this.preloader_mc.loadedFile.onEnterFrame = "The movie is " + p + "% loaded";

```

here is my question. the last line of the code defines what the textbox contained inside a clip called preloader\_mc with a variable of loadedFile should display the percentage loaded of the file according to the variable p set at the beginning of this code

why doesn’t this work?

by the way sbeener, it wasn’t working b/c i did miss one of the \_roots … it was acting funny b/c the mask was being put on the \_root still so it had nothing to mask since the meter was inside the symbol instance i made. now it works fine though 🙂 well except for the text thing i’m trying to do now 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 6, 2002, 10:28am UTC](https://forum.kirupa.com/t/preloader-text-w-pie-preloader/9150/2 "2002-12-06T10:28:03Z")

</div>

I’ve found a pie preloader component on [www.flashcomponents.com](http://www.flashcomponents.com). If you download that, it might give you some ideas.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 6, 2002, 4:11pm UTC](https://forum.kirupa.com/t/preloader-text-w-pie-preloader/9150/3 "2002-12-06T16:11:42Z")

</div>

i don’t have a membership there _sniffle_

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 6, 2002, 4:29pm UTC](https://forum.kirupa.com/t/preloader-text-w-pie-preloader/9150/4 "2002-12-06T16:29:32Z")

</div>

Neither do I, and I’m sure I downloaded it… Hang on, let me see if I can attach the .mxp to a post…

Give me a few secs.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 6, 2002, 4:32pm UTC](https://forum.kirupa.com/t/preloader-text-w-pie-preloader/9150/5 "2002-12-06T16:32:00Z")

</div>

There’s four .mxp files here, stored in a zip. There are a whole bunch of preloaders, so take your pick. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 6, 2002, 5:03pm UTC](https://forum.kirupa.com/t/preloader-text-w-pie-preloader/9150/6 "2002-12-06T17:03:48Z")

</div>

thank you so much
