0 Replies Latest reply on May 29, 2008 1:43 PM by durgle

    Skinning my custom preloader

    durgle
      Here is my custom preloader:


      /* Custom Preloader */
      package com.preloader {
      import flash.events.Event;
      import flash.events.ProgressEvent;
      import flash.geom.Rectangle;
      import mx.preloaders.DownloadProgressBar;

      public class DBPSubclass extends DownloadProgressBar {

      public function DBPSubclass() {
      super();
      // Minimum display time after download
      MINIMUM_DISPLAY_TIME = 0;
      // Set the default text during initialization
      // Progress
      initializingLabel = "Download Complete!\nInitializing...";
      }

      // Override label area to display custom text
      override protected function get labelRect():Rectangle {
      return new Rectangle(14, 5, 150, 30);
      }

      // Override download progress handler to display
      // Custom Text
      override protected function progressHandler(event:ProgressEvent):void {
      super.progressHandler(event);
      label = Math.round(event.bytesLoaded / 1000).toString()
      + "k of " + Math.round(event.bytesTotal / 1000).toString()
      + "k";
      }

      // Override to ensure display of progress bar during init and download
      override protected function showDisplayForDownloading(elapsedTime:int, event:ProgressEvent):Boolean {
      return true;
      }
      }
      }

      // EOF


      How can I change that ugly rectangles 1. corners to be straight edges, 2. color to black.?