3 Replies Latest reply on Dec 13, 2010 9:44 AM by kglad

    How To write MovieClipLoader addListener events in class file

    kiranemc2 Level 1

      I was write base class for a MovieClip. When i was call  "load" function this in MyScroller class. canot trigger  any  MovieClipLoader addListener events.

      in out put pannel given below messgae:

      "'file:///C|/Documents%20and%20Settings/Kiran%20Etukuri/Desktop/CustomScroll/test.swf'"

      not getting addListener onLoadErrorevents.

       

       

      if cant understand  How can i upload zipfile.

       

       

       

       

       

      class MyScroller extends MovieClip {

       

       

       

          public var content_mask;
          public var container;
          public var H_ponter;
          public var H_track;
          public var V_ponter;
          public var V_track;

       



          public var loadListener:Object;
          public var mcLoader:MovieClipLoader;
          public function MyScroller() {
      container.mask=content_mask;
              loadListener = new Object();
              mcLoader = new MovieClipLoader();
              mcLoader.addListener(loadListener);

       

              loadListener.onLoadError = function(target_mc:MovieClip, errorCode:String, httpStatus:Number) {
                 
      onLoad_Error()
              };

       

              loadListener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number):Void  {
      onLoad_Complete()

       

              };

       

              loadListener.onLoadInit = function(target_mc:MovieClip):Void  {
      onLoad_Init()
              };

       

          }
          public function load(url:String){
             
              mcLoader.loadClip(url,container);
              }
          public function onLoad_Complete(){
             
              trace("LOAD COMPLETED")
              }
          public function onLoad_Init(){
             
              trace("FILE LOADED")
              }
         
          public function onLoad_Error(){
             
              trace("FILE NOT FOUND")
              }
             
         
      }