4 Replies Latest reply on Feb 6, 2009 12:27 PM by BlaggerDK

    Menu Icon Problem


      I have a test project available here, containing some simple code that should work, yet its behavior is unexpected.

      Basically, I'm embedding some icon resources to use them in popup menus. I have an ActionScript file that embeds the resources and assigns them to a classname - the usual technique. I then wish to populate a menu using some XML as a dataprovider, with the icons being declared appropriately.

      In the Main.mxml, you can see three approaches to popping up a menu. They all use similarly-formatted XML, yet they differ in the manner in which they access the embedded resources.

      Only the third approach works, when it would seem reasonable that they all should work.

      Can anyone spot what the gotcha is that I'm missing in the first two approaches?

      Many thanks in advance for any enlightenment you can offer! :-)