Could you let me know which example you looked at that doesn't work? Also, can you give a more specific explanation of your problem and some code?
I have copied and pasted the example at the bottom of the page into an .as file and set it up as my .fla document class:
It works fine in OS X 10.5 CS4 Adobe Air 1.5. Previews with no errors in Windows 7 CS5 Adobe Air 2.0 via Parallels 5.0, but no tray menu. When published on OS X 10.5 CS4 Adobe Air 1.5, still does not work in Windows.
Maybe they changed something in Adobe Air 2.0? I didn't realize I installed it when I installed CS5. Any working examples out there?
I just tried it on my Mac using VMWare and Windows XP -- and the tray icon doesn't show up. It works properly on a regular Win XP computer (i.e. no VM). This appears to be a bug in AIR -- or, arguably, the VM, not the code sample.
I've just tested the .as provided by Adobe and it does not work in Windows XP native. I get the standard menu popup but not with the extra "Exit" command that it should be adding. The tooltip does not work either. Still works in OS X.
That's odd. Are we talking about the same thing, though? There is no standard menu on a system tray icon -- so Exit should be the only command that appears. There is a menu on the taskbar icon for windows -- but AIR doesn't provide an API for changing that icon or adding items to the menu -- only the system tray (which is more properly called the notification area).
Also, in my earlier test I had left the icons out of the package -- the system tray code works for me on Windows XP running in VMware Fusion -- although the icon image was mangled.
Oh what a journey. I suppose I've been on OS X for too long.
1. I was confusing task bar menu with tray icon menu.
2. You have to include the external icons in your air settings or supply them in the program folder.
Thanks a lot for your help