Main Window First Adobe AIR app.
In the above code, the window.open attribute in the script tag will initiate a new window to pop-up. In this child window, we intend to prompt the user to select a directory and the selected directory path will be printed on screen. For any real app this code can then be upgraded to upload a file from the user's system or to save a file stream to a given destination on a user's system. The window.open attribute triggers a file called select.html to open up in a new window. This select.html file will use an AIR API for accessing the user's file-system. This API is air.File.DocumentDirectory. This is the reason we place AIRAliases.js file within the application directory so that the files could have access to the APIs. The following code for the script opens up a Directory browser. The complete code can be found in the demoApp directory in the PCQ_Professional CD.
function doLoad( ) { file = air.File.documentsDirectory; file.addEventListener( air.Event.SELECT, doSelect ); document.getElementById( "btnSelect" ). addEventListener( "click", doBrowse); }
To check that the application code is functioning, we shall use ADL command. For this, go to the application root directory in the system's console window and by entering 'adl application.xml' we can test launch the application. If there are any errors, they will get reported on the console. After testing we can proceed with packaging the application using ADT command.
Integrate your work force and give a fight to your Competition.
Network with 2000 software professionals and create evangelists for your products.
About CIOL | Media Kit | Site Map | Contact Us | Help | Write to us | Jobs@CyberMedia | Privacy Policy
Copyright © CyberMedia India Online Ltd. All rights reserved. Usage of content from web site is subject to Terms and Conditions.