Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 888593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:25:29+00:00 2026-05-15T13:25:29+00:00

How can I send messages to or manipulate the contents of a NativeWindow instance

  • 0

How can I send messages to or manipulate the contents of a NativeWindow instance from the parent window that created it?

I have read several places that to communicate between NativeWindow instances in the same application you need to “maintain a LocalConnection or write a whole whack of JavaScript”. As it happens, I have no issue with writing a whole whack of JavaScript, but there doesn’t seem to be any documentation on how to do it. Does anyone know what to do?

Thanks for any help you can give me!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:25:29+00:00Added an answer on May 15, 2026 at 1:25 pm

    Answering my own question here. “A whole whack of JavaScript” can be summed up in one ridiculous line:

    var myWindow = air.NativeApplication.nativeApplication.openedWindows[intWindowCount].stage.getChildAt(0).window
    
    myWindow.document.getElementById('status').innerHTML = "success";
    

    This assumes you are using NativeWindow and loading HTML into using HTMLLoader and you’re only loading one child. intWindowCount represents the number of opened windows (including the Introspector). 0 represents the number of children you created using the stage.addChild() method. The code I’m using is below in its entirety. There is likely some cleaning up to do, but it should be a good starting point for anyone that needs to do the same thing:

        var htmlView = new air.HTMLLoader(); 
        htmlView.width = 300; 
        htmlView.height = 500; 
    
        var objWindowOptions = new air.NativeWindowInitOptions();
        objWindowOptions.transparent = false;
        objWindowOptions.systemChrome = air.NativeWindowSystemChrome.STANDARD;
        objWindowOptions.type= air.NativeWindowType.NORMAL;
    
        var wWindow = new air.NativeWindow(objWindowOptions);
        wWindow.x = objScreen.x;
        wWindow.y = objScreen.y;
        wWindow.width = objScreen.width;
        wWindow.height = objScreen.height;
        wWindow.activate();
    
        wWindow.stage.align = "TL"; 
        wWindow.stage.displayState = runtime.flash.display.StageDisplayState.FULL_SCREEN_INTERACTIVE;
        wWindow.stage.scaleMode = "noScale"; 
        wWindow.stage.addChild( htmlView ); 
        htmlView.load( new air.URLRequest("pageTwo.html") );
    
    
        setTimeout(function(){
            objScreen.setWindowReference(air.NativeApplication.nativeApplication.openedWindows[intWindowCount].stage.getChildAt(0).window);
            objScreen.setClock(cClock);
            cClock.screen = objScreen;
        },500);
    

    The timeout at the end is a horrible, embarrassing hack. I’m only using it because I haven’t found the right event yet to use with addEventListener().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a library that can send messages from a process. It needs
I have a website with CRM and the admin can send messages that will
I have a database of users where they can send messages to other users
I have make a messaging system in which user can send messages to each
I want to create a PHP app that can send text messages ; There
i have an iphone 3g and can successfully send text messages using the PHP
I want to make a script that can be used to send messages to
I see in the MVVM-Light package that I can send messages with tokens- what
I'm trying to send messages to a window that says Ctrl and Up-arrow has
I have problem while sending messages from android to PC. Messages are send when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.