【Q&A】Adobe Air transparent Windows system tray icon appears as a black block

归去

I asked a question on stackoverflow.com

In Windows, my Adobe air application needs a 100% transparent tray icon. But it always appears as a black block. I tried loading a 100% transparent image and creating a 100% transparent BitmapData, but no one works.

create a 100% transparent BitmapData:

var transparentImage = new air.BitmapData(16, 16, true, 0);

and set the tray icon image as this new image.

air.NativeApplication.nativeApplication.icon.bitmaps = [transparentImage];

In fact, I loaded another image which is not 100% transparent, it appears normally.

So what I missed?

The answer:

Just now I edited my PNG image to make my application works well. At first the image is 100% transparent, I opened it with photoshop and fill it with a color with 90% transparent. Then the system tray icon appears normally.