0 Replies Latest reply on Apr 24, 2008 10:03 AM by dwallbaum

    ScrollPane not disappearing after dynamic creation

    dwallbaum
      Gentlefolk;
      Have a movieclip that that has formatted text. This content is longer than the stage, so I thought of putting it in a scrollpane. Creating a dynamic text box kills the text formatting.

      The scrollpane has a name "my_SP". If I have this code on a button on the page where I want the content to reside, the following works:

      on (release) {
      my_SP.contentPath="StepAction_ID";
      }

      BUT, place this same code on another button that is NOT on that page, and no content appears in the scrollbox, for example:

      on (release) {
      this.gotoAndStop(5);
      this.my_sp2.contentPath="StepAction_ID";
      }

      Here I want Flash to go to frame 5 and place the content in StepAction_ID into the scrollbox "my_sp2". It does not populate.

      I CAN force the population by creating the scrollbox dynamically:

      on (release) {
      this.gotoAndStop(5);
      this.createClassObject(mx.containers.ScrollPane, "my_sp2", 20);
      my_sp2.move(100, 200);
      my_sp2.setSize(400, 200);

      this.my_sp2.contentPath="StepAction_ID";
      }

      BUT, when I click another button and go elsewhere in the file, the scrollbox remains, and I have text overwriting the scrollbox content.

      How can I get scrollbox content to stay on one frame?

      Many thanks!

      Don