0 Replies Latest reply on Oct 9, 2007 11:08 AM by Slim222

    Change item programmatic skin at runtime

    Slim222
      AS3 lets you programatically skin a class. For example, on MenuBar control. you can tell an instance of a menuBar which skin to use when a mouse clicks on it, with the following line:

      myMenuBar.SetStyle("itemDownSkin", myProgrammaticSkinClassName);

      However, let's say you want to change to another class after the menubar has already been created? At this point the SetStyle function has no effect as the menubar has continues to display a cached appearance of itself. It seems your only option is to destroy the existing control and recreate it with the new style.

      Is there a more straightforward way to dynamically change the skin of a control after it has been created?

      Thanks to anyone out there! ed