In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: Accordion 1

I don't understnad why I can't see the first accordion window's title bar? When compiling it locally I DO see it.
Locally compiling with  minimalcomps 0.9.10
Thank you
Get Adobe Flash player
by aobyrne 25 Apr 2011
/**
 * Copyright aobyrne ( http://wonderfl.net/user/aobyrne )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/At2E
 */

//Copied from here: http://www.bit-101.com/blog/?p=2313
//from http://wonderfl.net/c/njsw
      package
      {
          import com.bit101.components.Accordion;
          import com.bit101.components.Component;
          import com.bit101.components.HBox;
          import com.bit101.components.PushButton;
          import com.bit101.components.VBox;
          import com.bit101.components.Window;
         
          import flash.display.Sprite;
       
          [SWF(BackgroundColor=0xdddddd)]
          public class Playground extends Sprite
          {
              private var vbox:VBox;
             
              public function Playground()
              {
                  //Component.initStage(stage);
                  var hbox:HBox = new HBox(this, 50, 20);
                  for(i = 0; i <5; i++)
                  {
                      var button: PushButton = new PushButton(hbox, 0, 0, "button " + i);
                      button.width = 50;
                  }

                  vbox = new VBox(this, 50, 50);
                  vbox.spacing = 0;
                  for(var i:int = 0; i <4; i++)
                  {
                      var window:Window = new Window(vbox, 0, 0, "Accordion " + (i + 1));
                      window.hasMinimizeButton = true;
                      window.draggable = false;
                      if(i != 0) window.minimized = true;
                  }
                  
                  var window1:Window = new Window(this, 200, 100, "test ");
                  var button1: PushButton = new PushButton(window1, 0, 50, "button ");
                  
                var accordion:Accordion =   new Accordion(this, 320, 100);
                var windowAt1:Window = accordion.getWindowAt(0);
                windowAt1.title = "Accordion 1";
                windowAt1.addChild(new PushButton(null, 0, 0,"1"));
                var windowAt2:Window = accordion.getWindowAt(1);
                windowAt2.title = "Accordion 2";
                windowAt2.content.addChild(new PushButton(null, 0, 0,"2"));
              }
          }
      }