4 Replies Latest reply on Jan 4, 2007 5:44 PM by Boen_Zhou

    ScrollPane.complete problem

    Boen_Zhou
      Hi, Everyone!

      We all know the following example works.
      ------------------------------------------------------------------------------------------ ----------------
      /**
      Requires:
      - ScrollPane in library
      */

      System.security.allowDomain(" http://www.helpexamples.com");

      this.createClassObject(mx.containers.ScrollPane, "my_sp", 10);
      my_sp.setSize(320, 240);

      // Create listener object for completed loading.
      var completeListener:Object = new Object();
      completeListener.complete = function(evt_obj:Object) {
      trace(evt_obj.target.contentPath + " has completed loading.");
      };
      // Add listener.
      my_sp.addEventListener("complete", completeListener);

      my_sp.contentPath = " http://www.helpexamples.com/flash/images/image1.jpg";

      ------------------------------------------------------------------------------------------ ------------------------------------

      But if I change,

      my_sp.contentPath = "myMovieClipName";

      SrollPane can show it, however ScrollPane.complete did nothing! What happened?