Flex - How does nativeApplication.icon work?

NativeApplication.nativeApplication.icon.bitmaps = bitmapData();

      

I'm trying to edit bitmaps for the system tray icon, but I got the error:

Implicit coercion of a value of type flash.display: BitmapData to an array of unrelated type.

What mistake did I make, or could you tell me the meaning of this error?

0


a source to share


3 answers


Icon.bitmaps is an array of bitmap data with one BitmapData instance for each size. You have to reassign the whole array:

NativeApplication.nativeApplication.icon.bitmaps = new Array(bitmapData);

      



Alternatively, as mentioned in the liveocs, you can specify all sizes of the bitmap:

NativeApplication.nativeApplication.icon.bitmaps = 
    new Array(icon16x16.bitmapData, icon128x128.bitmapData);

      

+3


a source


I think you want a type like:

SystemTrayIcon (NativeApplication.nativeApplication.icon) .bitmaps



SystemTrayIcon is a Windows specific class I believe.

0


a source


This is a discussion of this topic from Adobe:

http://livedocs.adobe.com/flex/3/html/help.html?content=taskbar_1.html

0


a source







All Articles