Hi friends, this is phani.
Can anybody tell me how to refresh a air window. This is the code
which i used to open a air window.
private function helpClick():void{
var options:NativeWindowInitOptions =
new NativeWindowInitOptions();
options.maximizable = true;
options.minimizable = true;
options.resizable = true;
options.transparent = false
//create the window
var html:HTMLLoader = HTMLLoader.createRootWindow(false,options,true,
new
Rectangle(Number(50),
Number(50),
Number(500),
Number(700)));
var newWindow:NativeWindow = html.stage.nativeWindow;
newWindow.alwaysInFront = true;
//add content to the window
html.load(new URLRequest("app:/html/index.html?house_keeping.htm"));
html.addEventListener(Event.COMPLETE, loadDocument);
function loadDocument(event:Event):void{
html.window.document.title = "HELP";
//activate the new window
newWindow.activate();
html.removeEventListener(Event.COMPLETE, loadDocument);
};
//add handlers to move and close the window if there is no
Chrome
if(options.systemChrome == NativeWindowSystemChrome.NONE){
newWindow.stage.addEventListener(KeyboardEvent.KEY_DOWN,
function(e:Event):void{e.target.stage.nativeWindow.close();});
newWindow.stage.addEventListener(MouseEvent.MOUSE_DOWN,
function(e:Event):void{e.target.stage.nativeWindow.startMove();})
}
}
<mx:LinkButton label="Help" right="0" click="helpClick()"/>
>From the above code when i clicked the linkbutton air window opens.
And if i click once again the air window should be refresh but should
not open another window.
So, please help me from this problem.
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.