5 Replies Latest reply on Jul 27, 2006 12:44 PM by kglad

    listeners dont work properly :'(

    Level 7
      I have been working with this for two days and i cant make it work.......I
      am going crazy....

      Ok i have this code if someone can help... i will appreciate that A LOT.

      The thing is if i compile the program everything works well, if i upload it
      or test it on slow connection y doesnt even do the onStart event... I show
      you:

      I have this code.

      firstRoom = random(3);

      SetPic("sideA_mc", picorder['id'+firstRoom+'A'], -1, -1, 0, 0, 5);
      _root.loadingFirst++;
      SetPic("sideB_mc", picorder['id'+firstRoom+'B'], -1, -1, 0, 0, 5);
      _root.loadingFirst++;


      previously I have:

      //******************************************************************
      var listener = new Object();
      listener.onLoadError = function(target_mc:MovieClip, errorCode:String,
      httpStatus:Number) {
      trace(">> loadListener.onLoadError()");
      trace(">> ==========================");
      trace(">> errorCode: "+errorCode);
      trace(">> httpStatus: "+httpStatus);
      };

      listener.onLoadStart = function(mc:MovieClip) {
      trace("STARTLOADING:"+mc);
      };

      listener.onLoadComplete = function(mc:MovieClip) {
      [...]
      };

      listener.onLoadInit = function(mc:MovieClip) {
      [...]
      };

      var mcLoader:MovieClipLoader = new MovieClipLoader();

      mcLoader.addListener(this.listener);

      function SetPic(Sprite, fichero:String, StartX:Number, StartY:Number,
      SizeX:Number, SizeY:Number, Align) {
      mcLoader.loadClip(fichero, Sprite);
      _root.loading_mc._visible = 1;
      trace("SetPic");
      };

      /******************************************************

      Can you spot the problem????

      THANKS!!!! ! ! ! !