5 Replies Latest reply on Jul 22, 2008 9:36 AM by jwoozy

    using Linkbar objects and EventListeners

    jwoozy
      The code:
      Note, I left out most object specific details, like width and height etc...

      var pl:Panel = new Panel();
      var lb:LinkBar = new LinkBar();
      lb.addEventListener(MouseEvent.CLICK, httprequestObject);

      var vs:ViewStack = new ViewStack();
      var cv:Canvas = new Canvas();
      cv.label = "navigation button";

      vs.addChild(cv);
      lb.dataProvider = vs;
      pl.addChild(lb);
      this.addChild(pl);

      public function httprequestObject(e:MouseEvent):void{
      Alert.show("success!");
      }

      For whatever reason this doesn't work. Suggestions, thoughts.