check out this cool preloader... It was posted on
www.australianinfront.com.au a week or so ago, by Robbie Shephard. It is
quite small (generates its own graphics!!) and still produces a nice result
!

Some of you out there may be interested in this code snippet:



fscommand("allowscale", false);
myFormat = new TextFormat();
myFormat.font = "_sans";
myFormat.size = 9;
myFormat.color = 0xFFFFFF;
function drawbar() {
 //create the mc for the bar
 _root.createEmptyMovieClip("preloader", 1);
 _root.createTextField("loadText", 5, 125, 180, 100, 20);
 preloader._x = 125;
 // where the preloader bar sits on the stage - x position
 preloader._y = 200;
 // where the preloader bar sits on the stage - y position
 // create the mc for the bar outline
 _root.createEmptyMovieClip("outline", 2);
 outline._x = 125;
 // this is the preloader outline x position
 outline._y = 200;
 // this is the preloader outline y position
 with (outline) {
  lineStyle(1, 0xFFFFfF, 100);
  //moveTo(0, 0);
  moveTo(100, 0);
  lineTo(100, 10);
  moveTo(0, 10);
  lineTo(0, 0);
 }
}
function checkLoaded() {
 loaded = getBytesLoaded();
 total = getBytesTotal();
 if (loaded == total) {
  _root.gotoAndPlay("beginMovie");
  clearInterval(checkInt);
  removeMovieClip(outline);
  removeMovieClip(preloader);
  loadText.text =""
 } else {
  percentage = (Math.round((loaded/total)*100));
//  loadText.text = "loading "+percentage+"%";
  loadText.text = "Loading "+int(loaded/1024)+"kb of "+int(total/1024)+"kb";
  loadText.setTextFormat(myFormat);
  with (preloader) {
   clear();
   lineStyle(1, 0xFFFFFF, 100);
   beginFill(0xFFFFFF, 100);
   moveTo(0, 0);
   lineTo(percentage, 0);
   lineTo(percentage, 10);
   lineto(0, 10);
   lineTo(0, 0);
   endFill();
  }
 }
}
drawbar();
checkInt = setInterval(checkLoaded, 100);
stop();


---
You are currently subscribed to fugli as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to