3 Replies Latest reply on Feb 28, 2008 10:05 PM by kglad

    Custom movie clip loader

      I'm interested in making a custom movie clip loader but I honestly don't know where to begin with this one. I'll try to explain what I'm aiming for the best that I can. Let's say I have a square that's whatever size. When the clip is 0% loaded, the square will be invisible. When the clip is 100% loaded, the entire square will be visible. As the clip loads, the square will start to fill in clockwise (starting at the top) in a circular motion, with the center of the square being the center radius point.

      Imagine your typical radar image. A green circle with the beam sweeping around in a circular motion.

      Any ideas on where to begin with this?

      If anyone has any questions or needs additional info, let me know.

      Thanks in advance.
        • 1. Re: Custom movie clip loader
          kglad Adobe Community Professional & MVP
          create your square movieclip. create a 1 degree sector (pie shaped) with its registration point at the "v". create an empty moviecilp to mask your square. as loading progresses, attach and rotate your sectors to your mask.
          • 2. Re: Custom movie clip loader
            bhuber7 Level 1
            Thanks for the response, kglad. Using your advice, this is what I'm thinking.

            I'd have to create a wedge that is 3.6 degrees, since I want one wedge to appear per percent loaded (3.6 degrees x 100 (%) = 360 degrees). I'm not too familiar with using ActionScript to draw. How would I be draw a wedge that is precisely 3.6 degrees and further, how would I attach a new instance of it right next to the last one made. Currenly I have my movie clip loading when loadedBytes/totalBytes = 100, so I know I can add one wedge per loadedByte.

            Thanks again. You've responded to some of my other posts in the past and I value your insight.

            • 3. Re: Custom movie clip loader
              kglad Adobe Community Professional & MVP
              i would use the drawing api to create the sector because my artistic skills are somewhat difficient. (actually, they're close to non-existant.)

              you're just going to use an angle of Math.PI/50.