3 Replies Latest reply on Mar 31, 2007 11:57 PM by kglad

    How can I put a text preloader into this code?

    kingmonkey Level 1

      I've been working on a site where swf's are loaded into main movie with transitions between the sections. I have the following code on the mcContainer...

      [CODE]onClipEvent (enterFrame) {
      if (!loaded && this._url != _root._url) {
      if (this.getBytesLoaded() == this.getBytesTotal()) {
      loaded = true;

      How can I add a text percentage preloader into this code?

      I usually use a the following code for preloaders...
      [CODE]myLoaded = Math.round(getBytesLoaded());
      myTotal = Math.round(getBytesTotal());
      myPercent = myLoaded/myTotal;
      myBar._height = myPercent*97;
      myText = Math.round(myPercent*100)+"%";
      if (myLoaded == myTotal) {
      gotoAndStop("Scene 1", "loaded");
      } else {
      gotoAndPlay("Scene 1", "preloader");

      ... but I'm not sure where to add the code into the exisiting code, as I'm a beginner at AS.

      Any help will be greatly recieved.