7 Replies Latest reply on Jan 23, 2008 10:33 AM by Handycam

    Dynamic Viewstack member problem

    Handycam Level 1
      OK, based on information from an earlier helpful post, I am trying to remove itsems from a viewstack and add new ones based on a user response.

      /* set the viewstack members */
      private function setStack(_which:int) : void {
      mainViewStack.removeChild(s0);
      mainViewStack.removeChild(s1);
      if (_which == 1){
      var _step2:Step2 = new Step2();
      mainViewStack.addChild(_step2);
      }

      }

      This is working, in as far as the old 2 items are deleted and the new item appears on the stage. However, I have a couple of questions:

      -- this only works in my Step2.mxml is in the same folder as the main app. Originally, it was in "/components", so how would I specify to look in the subdirectory like that?

      -- the contents on my component appear, but the linkbar bound to the viewstack does not pick up on the new member. How do I make that happen?