Adobe AIR SystemTrayIcon with BitmapData and NativeMenu

October 2nd, 2007 by Justin

This is a simple app (just an experiment), that makes use of SystemTrayIcon and NativeMenu (some of the new features in AIR Beta2). It doesn't do anything, just demonstrates some of the new functionality of AIR Beta 2.

I have 3 movieclips on stage, one contains a textfield that updates (counts), one is a vector animation, and one is a sequence of images. I use setInterval to create bitmapdata evey 40 millisenconds, and then update the SystemTrayIcon, so it animates.

I have also implemented NativeMenu, that creates a contextmenu when you right click on the tray icon. The menu item that you select, gets checked, and disabled, and changes the animation accordingly.

Note: you will need the AIR Beta 2 Runtime. I have only tested it on PC.

Here is a the AIR file, and well as the source code. Hope someone finds it handy.

Filed under source, tutorial, AS3, AIR having

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.