1 Reply Latest reply on May 3, 2008 3:33 AM by Josamoto

    Dynamically changing Button class

    Josamoto
      You can change a buttons 'upSkin' for exaple with the following code:
      myButton.setStyle('upSkin', myFunkyClass);
      where myFunkyClass is created like this:

      [Embed blah blah blah]
      var myFunkyClass:Class;


      I want to dynamically set the style for the button, at runtime. If I can explain with some code, I want to achieve the following:

      myButton.setStyle('upSkin', '/myimage/set/my/image/dynamically/without/embedding/it.jpg');

      Thanks for the help in advance. :)