Hi everyone! I have problem with my AIR app. I build an AIR app with
Flex builder 3. I create a taskbar icon for my app. When I start app,
the icon visible in system taskbar. So what I want is that I minimize
the app, it is hidden until someone click to icon.

I write code to create taskbar icon object in AS3 class and in MXML
file, I call it. Here is my code in systrayap.as

var systray:SystemTrayIcon = NativeApplication.nativeApplication.icon;
systray.addEventListener(ScreenMouseEvent.CLICK,function(event:Event):void{
  stage.nativeWindow.visible = true;                            
});

but it error. The message is "TypeError: Error #1009: Cannot access a
property or method of a null object reference."

How to solve it? I don't know how to invisible the app when I click
minimize button. 

Can anyone help me? Thank in advance!

Hai Anh

Reply via email to