2 Replies Latest reply on Jul 28, 2011 10:43 PM by Flex harUI

    Flex 3.5, loading .png at runtime, as a button skin

    mitz11

      I have a VERY specific requirement.  I need to be able to load up a bunch of .png images and set them as the skins for various buttons.  Here is what I want to be able to do:

       

      myButton.setStyle("skin", ImageLoader.loadImage("www.imageurl.com/image.png"));

       

      I really, really want to avoid having to make callback functions, because I'll end up with a billion of them.  Optimally, I will be able to make ImageLoader a pure static class so I can just use this from anywhere.

       

      This is in Flex 3.5.