2 Replies Latest reply on Feb 10, 2010 1:56 AM by Francisc

    Select image and set as Icon

    Francisc Level 3

      Hello!

       

      I want to set an image selected image using the file.browse in an AIR app to be the icon for a button.

       

      My question is to what kind of type do I have to cast it in order to not throw an exception?

       

      If I do:

       

      myBtt.setStyle('icon',pathToImage); // does not work

      myBtt.setStyle('icon',imageVariable);// of the Image class, still doesn't work.

       

      How can I do that please?

       

      Thanks!