Developing AIR application using actionscript only
How to create an AIR application using only actionscript(without mxml)?
There are many ways to do this. As long as you can compile the Actionscript code to a SWF file, you can then package it into an AIR file.
If you ask how to do this in Flex Builder, at least in 4.0, when you create a desktop app. project. In the last dialog, there is a row says
main application file, change the default file extension .mxml to .as, then FB automatically create the project with an actionscript package.
Then you can start to code in actionscript without using Flex.
Hope this answers your question.
-ted
Similar Messages
-
AIR application using actionscript
How to create an AIR application using only actionscript(without mxml)?
This is a forum for users of Adobe RoboHelp outputting to Adobe AIRHelp format. I think you need help from the Adobe AIR developers forum.
The RoboColum(n)
@robocolumn
Colum McAndrew -
Adding native menus to an AIR application using ActionScript
Hi,
I'm working on Mac and PC with Air application.
I'd creates a class extends Menu witch goal is to create a nativeMenu.
My class is
package
import flash.desktop.DockIcon;
import flash.desktop.NativeApplication;
import flash.desktop.SystemTrayIcon;
import flash.display.BitmapData;
import flash.display.Loader;
import flash.display.NativeMenu;
import flash.display.NativeMenuItem;
import flash.display.NativeWindow;
import flash.display.NativeWindowDisplayState;
import flash.display.NativeWindowSystemChrome;
import flash.display.Screen;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.NativeWindowDisplayStateEvent;
import flash.geom.Rectangle;
import flash.net.URLRequest;
import flash.sampler.NewObjectSample;
import mx.controls.Alert;
import mx.controls.Menu;
import mx.core.Application;
import mx.core.FlexGlobals;
import mx.core.WindowedApplication;
import spark.components.Application;
import spark.components.WindowedApplication;
public class createMenuBar extends Menu
public function createMenuBar()
* Initializes the app after loading
public function initWindow():void{
// Create root menu
var rootMenu:NativeMenu = new NativeMenu();
// Create root submenus
rootMenu.addSubmenu(creerMenuFichier(),"Fichier");
rootMenu.addSubmenu(creerMenuEdition(),"Edition");
// Attach event listener routine to root menu
rootMenu.addEventListener(Event.SELECT, dispatchMenuCommand);
// Assign application menu (Mac OS X)
if(NativeApplication.supportsMenu){
NativeApplication.nativeApplication.menu = rootMenu;
// Assign window menu (MS Windows)
if(NativeWindow.supportsMenu ){
stage.nativeWindow.menu = rootMenu;
* createMenuCommand()
* Creates a menu command based on parameters
public function createMenuCommand(menuContainer:NativeMenu,
itemLabel: String, itemKey:String,itemModifiers:Array,
itemMnemonic:int, selectHandler:Function):NativeMenuItem{
var cmd:NativeMenuItem = NativeMenu(menuContainer).addItem(new NativeMenuItem(itemLabel));
cmd.mnemonicIndex = itemMnemonic; // index de la lettre de rappel du raccourci par dŽfaut 0
cmd.keyEquivalent = itemKey;
if(itemModifiers !=null){
cmd.keyEquivalentModifiers = itemModifiers;
if (selectHandler !=null){
cmd.addEventListener(Event.SELECT, selectHandler);
return cmd;
* createMenuSeparator()
* Creates a menu separator
private function createMenuSeparator(menuContainer:NativeMenu):NativeMenuItem{
var sep : NativeMenuItem = NativeMenu(menuContainer).addItem(new NativeMenuItem("sep", true));
return sep;
* Creates the File menu for app
private function creerMenuFichier(): NativeMenu{
var mnu:NativeMenu = new NativeMenu();
createMenuCommand(mnu, 'Changer Utilisateur','k',null, 0, hChangeUser);
createMenuCommand(mnu, 'Verrouiller/DŽverrouiller','', null, 0, hLock);
createMenuCommand(mnu, 'Maintenance','', null, 0, hMaintenance);
createMenuSeparator(mnu);
// If Mac OS X, then use Quit label
if (NativeApplication.supportsMenu) {
createMenuCommand( mnu, 'Quitter', 'q', null, 0, hExit);
// If Windows, then use Exit
else {
createMenuCommand( mnu, 'Fermer', 'x', null, 0, hExit);
return mnu;
public function creerMenuEdition() : NativeMenu{
var mnu:NativeMenu = new NativeMenu();
createMenuCommand( mnu, 'Annuler', 'z', null, 0, null);
createMenuCommand( mnu, 'RŽpŽter', 'y', null, 0, null);
createMenuSeparator(mnu);
createMenuCommand( mnu, 'Couper', 'x', null, 2, null);
createMenuCommand( mnu, 'Copier', 'c', null, 0, null);
createMenuCommand( mnu, 'Coller', 'v', null, 0, null);
return mnu;
* Catch-all menu dispatcher for all menus
public function dispatchMenuCommand(evt: Event):void {
var menuItem:NativeMenuItem = evt.target as NativeMenuItem;
if (!menuItem.hasEventListener('select')) {
Alert.show(menuItem.label + " a ŽtŽ selectionnŽ!");
* Simple handlers for certain menu commands
public function hChangeUser(evt: Event):void {
Alert.show( "Vous allez changer d'utilisateur");
On main air app.mxml file I create menu with
var menu : createMenuBar = new createMenuBar();
menu.initWindow();
application menu appear but when I work on Windows system, windows menu is not visible.
Can you help me to solve that?
ThanksI believe you ran into an AIR limitation. In the class header for NativeMenu it mentions:
A native menu is a menu that is controlled and drawn by the operating system rather than by your application. AIR supports the following types of native menus:
Application menus are supported on OS X. Use the NativeApplication.supportsMenu property to test whether application menus are supported on the host operating system. An application menu is displayed on the Menu bar at the top of the Mac desktop. OS X provides a default menu for every application, but many of the menu commands are not functional. You can add event listeners to the default items, replace individual menus and items, or even replace the default menu entirely. Access the application menu object using the NativeApplication menu property.
Window menus are supported on Windows and Linux. Use the NativeWindow.supportsMenu property to test whether window menus are supported on the host operating system. A window menu is displayed below the window title bar. The area occupied by the menu is not part of the window stage. Applications cannot draw into this area. Assign a menu to a window using the NativeWindow menu property.
-ref: http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/display/Nati veMenu.html
Use the NativeMenu.isSupported property to check if OS supports it. There is also NativeWindow.supportsMenu property that may help you. I hope that helps. -
How to develop web application using ejb3.0 with eclipse
Hi ,
I am new to ejb3.0 with eclipse. If any one familar that please guide me...
how to develop web application using ejb3.0 with eclipse.please help me... server jboss4.2.2. database mqsql5.0
Thanks,jsf_VWP5.5.1 wrote:
I am new to ejb3.0 with eclipse. If any one familar that please guide me...http://help.eclipse.org/help33/index.jsp -
Silenting Installing AIR applications using Altiris
I was wondering if anyone can provide some guidance or
recommendations on how to silently install an AIR application using
Altiris. We are not able to package the .air installer and proceed
with the setup without prompting the user for the options screens.
Any help or assistance that can be provided would be greatly
appreciated.
Thanks!If you have signed up for Adobe AIR Runtime Distribution Agreement, you should be able to use Silent Installation of AIR Runtime and App. We use that in our msi installer.
Usage is:
-silent {-eulaAccepted ( -location <loc> ) -desktopShortcut -programMenu} path_to_air_file
Details of the options are included in the adobe_air_runtime_redistribution.pdf that you will get when you sign the agreement.
-Jeesmon -
Developing iOS application using Adobe Flash Pro CS5
Hi,
I have Adobe Flash Pro CS5.
Is it possible to develop iPhone (iOS) application using this product (I have an iPhone iOS option in the New Document dialog)?
If it is possible, how do I start a new iPhone project? How do I continue from there?
Thanks,
Janiv.This question needs to be posted in the Flash forum. This forum is only for the player.
-
Hi Friends,
I need to develop a desktop mail client for web based RIA developed in extjs. The air application has to communicate with a flex application hidden inside the web app and get the SMTP Details and send mail using the socket connection.
Till date i have found few plugins and i am testing out each one of them.
1) byteArray SmtpMailer for socket mailing which has login authentication, attachment support.
2) suiggly with halo rich text editor for spell check enabled mail composer.
3) flash network localConnection for communication between web flex hidden inside extjs ria app and air app, The flex application and extjs application communicate using FABridge.js.
4) updateFramework for frequently updating the air app with new features.
Drawbacks i face:
1) ByteArray SmtpMailer works fine but i am unable to find a plugin for SSL encryption support which is required for connecting with gmail SMTP server.
2) The flex web application size grows upto 1.8MB(approx) with all SDK librarys which are part of 4.0.0.10396 SDK, which is thrice as big as the extjs RIA app.
3) The updateFramework for updating a air application throws errors, which is diffcult to troubleshoot or understand by novice like me.Ok, just figured this out. The cert I created was somehow malformed. I simply created a new one with the Flash IDE which worked fine. Any other method of creating the cert that I tried failed, including the keytool command line utility.
-
Problem signing AIR application using migrate option
I have a pkcs12 certificate (certificate.p12) which expired on 2014-09-16.
Looking at Adobe AIR * Signing an updated version of an AIR application it should be in range of the 180 days/365 days after expiration, so it should be usable to sign for migration purposes.
But using it like this:
adt -migrate -storetype pkcs12 -keystore certificate.p12 test.air migrated_test.air
Produces the following error:
The signer's certificate chain contains a revoked certificate
Questions:
a) Does anybody have an idea what the problem could be or possible solutions?
b) Is the error-message really caused by the expiration of the certificate, or would that error message be different, like for example: The signer's certificate chain contains an expired certificate?
c) My thinking in b) is in regard to that the certificate was issued by TC TrustCenter GmbH which no longer issues certificates. Could this be the cause here?Okay, i just learned further infos. It really seems to be the case that the certification entries of TC TrustCenter GmbH were set to revoked state.
Wahy was that done, should they be allowed to do this at this time?
Can i still somehow do the migration? -
Hello,
I have compiled "successfully" a Worker swf that uses some Air classes (like File, FileStream etc).
Then i have embedded it into an AIR desktop application, but when i execute the application (with ADL or even installing and then executing it),
i receive a Security Error from the worker, like if it's context doesn't support that type of operations. Is it correct?
Can't workers use Air features like file write/access even if they are embedded in a Desktop Air Application?
It means that can't workers open o write a file in every scenarios?
Thank you
DanieleSorry. This is the answer:
http://forums.adobe.com/message/4688380#4688380 -
AIR 3.8, ActionScript-only projects, which SDK?
Hey all,
I haven't seen the box appear before on the AIR SDK download page that Flex users should download an alternate version. Does this also pertain to projects in Flash Builder (4.7 Premium) that are ActionScript for Mobile as well (which do not use Flex)? It seems like I should download the version that lets Flex work, otherwise are we going to have to continuously flip back and forth between the regular SDK and the Flex-friendly SDK depending on the project?Hi Shawn,
Since AIR 3.8, we support only PIE enabled binaries, as per Apple recommendation.
For this, the minimum supported iOS version is 4.2. The ANE you are using specifies a minimum iOS version of 4.0 in its platform-iphone.xml, present at: https://github.com/alebianco/ANE-Google-Analytics/blob/master/build/platform-iphone.xml
You will need to change the line:
<option>-ios_version_min 4.0</option>
to:
<option>-ios_version_min 4.2</option>
and rebuild the ANE to make it work.
Regards,
Neha -
Hello, I am very new to flex and don't have a programming background. I am trying to create an air app with flex that looks at a folder on the users desktop where csv files will be dropped by the user. In the air app the user will be able to browse and look for a specific csv file in a list container, once selected the information from that file should be displayed in a datagrid bellow. Finally i will be using Alive PDF to create a pdf from the information in this datagrid laid out in an invoice format. Bellow is the source code for my app as a visual refference, it only has the containers with no working code. I have also attached a sample csv file so you can see what i am working with. Can this be done? How do i do this? Please help.
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="794" height="666">
<mx:Label x="280" y="19" text="1. Select Purchase Order"/>
<mx:List y="45" width="232" horizontalCenter="0"></mx:List>
<mx:Label x="158" y="242" text="2. Verify Information"/>
<mx:DataGrid y="268" height="297" horizontalCenter="0" width="476">
<mx:columns>
<mx:DataGridColumn headerText="Column 1" dataField="col1"/>
<mx:DataGridColumn headerText="Column 2" dataField="col2"/>
<mx:DataGridColumn headerText="Column 3" dataField="col3"/>
</mx:columns>
</mx:DataGrid>
<mx:Label x="355" y="606" text="3. Generated PDF"/>
<mx:Button label="Click Here" horizontalCenter="0" verticalCenter="311"/>
</mx:WindowedApplication>Open the file, parse it, populate an ArrayCollection or XMLListCollection, and make the collection the DataGrid dataProvider:
http://livedocs.adobe.com/flex/3/html/help.html?content=Filesystem_08.html
http://livedocs.adobe.com/flex/3/html/help.html?content=12_Using_Regular_Expressions_01.ht ml
http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_6.html
http://livedocs.adobe.com/flex/3/langref/mx/collections/ArrayCollection.html
http://livedocs.adobe.com/flex/3/langref/mx/collections/XMLListCollection.html
If this post answered your question or helped, please mark it as such. -
How to Play/Pause All for Adobe Air Application using AS3 in Flash CS4?
I am new to Flash and I'm creating an educational application in AS3 in Flash CS4 for Adobe Air. I want to use buttons to play and pause all content (movieclips AND sound).
I have created play and pause buttons that worked by switching the frame rate between 0 and 20, unfortunately I've realised that it's never really 0fps but rather 0.01fps and so it continues playing, albeit very very slowly. Also this doesn't affect the audio; I have set sound files to Stream which are synced to movieclips on their timelines, but even when the application is set to 0fps the audio continues.
Since I have various levels with numerous movieclips each with synced audio, what i'd like is to be able to do is pause absolutely everything within each movieclip with one button and to be able to resume from the same place using another button. Is this possible? If not, is there a global function to pause/resume the entire application/program?
Thanks in advance for your help!Its possible but you would need to tell each movieclip and audioclip to play/pause. You can create a for loop inside your mouse event function to find each movieclip and pause/play its timeline and a separate for loop for audio clips. Also instead of setting fame rate to 0 for pause just use a stop() command.
-
AIR Application Installer and Only Installing Select Files
I have a AIR desktop application where I want to allow the user to install the base application and the later add more media files to the application as they purchase the media files. Would it be possible to add the media files using the standard AIR installer? Or would I have to resort to a custom installer?
When AIR installs an application does it complete delete the files from the previous install?
Would it be possible to update the base application and not touch existing media files?
Can you pass an install path to the AIR installer?I have done something similar with a document management app.
Once the app was installed it would check for a DVD / Thumb drive and silently copy all the documents from another drive to the (ASD) AppStorageDirectory.
You could also download your media files to the AppStorageDirectory as well.
When my app gets updated I have a function that deletes obsolete files from the ADS and leave the files I need to persist untouched.
Here is a snippet that reads available drives and looks for a specific named drive and then creates an Array listing all the files which can
then be copied using SOURCE.copyToAsync(DESTINATION)...
var os:String = Capabilities.os.substr(0, 3).toLowerCase();
var currentDrives:Array = (os=="mac") ? new File('/Volumes/').getDirectoryListing() : File.getRootDirectories() ;
var fileList:Array;
var fileCount:int = 0;
var fileListArr:Array = new Array();
for each(var file:File in currentDrives){
//trace ("Drive: " + file.name + " Size: " + file.size);
if(file.name.toString().indexOf("KnownNameofDVD")>-1){
trace ("Drive: " + file.name + " Size: " + file.size);
fileList = (os=="mac") ? new File('/Volumes/'+file.name).getDirectoryListing() : new File(file.name.getDirectoryListing()
for(var l:int = 0 ; l<fileList.length; l++){
//trace(fileList[l].nativePath)
fileCount++;
fileListArr.push(fileList[l].nativePath.toString()) -
I follow the https://www.youtube.com/watch?v=CXKpw1HNoUA but its giving an error as
There was an error downloading the update. Error# 16822manually download and update, Adobe - Adobe AIR
-
Adobe Air Application only works using Super Administrator account on Windows XP
Good day
i really need some help. I developed air application that uses remote service, sql lite etc. It is working on my computer WIndows XP sp2. To test, i even created a guest account and it works fine. But when i deployed it to our client, the application doest work. Only the login page appears. I ask the it personnel there and ask if there are any restriction on the account of the user and said there is none because they are using Domain account. But when the super administrator is logged in, it works
Your help will greatly apprciatedYour help me, I iwill greatly apprciated
HELP MALAYSIA
Date: Thu, 21 Oct 2010 20:54:19 -0600
From: [email protected]
To: [email protected]
Subject: Adobe Air Application only works using Super Administrator account on Windows XP
Good day
i really need some help. I developed air application that uses remote service, sql lite etc. It is working on my computer WIndows XP sp2. To test, i even created a guest account and it works fine. But when i deployed it to our client, the application doest work. Only the login page appears. I ask the it personnel there and ask if there are any restriction on the account of the user and said there is none because they are using Domain account. But when the super administrator is logged in, it works
Your help will greatly apprciated
>
Maybe you are looking for
-
I have a Macbook Pro and can't figure out how to change my password. Any help?
This is a password for like entering my compu
-
Making a photo book, can't remove borders
I'm trying to make a picture book, but every layout I try leaves a thin border or seam between the solid color of the layout and my inserted photo. Is there any way to remove the seam completely?
-
Is it possible to make a slipstream using the recovery CD (SM30-154 WXP)?
Is it possible to make an slipstream using the product recovery (satelite pro SM30-154 and windows XP home) and die windows XP sp 3 update? If so, how? grtz Bert
-
Indesign files won't open over a network
I have just copied my entire work folder from a 17" iMac Core Duo to a 20" iMac Core Duo. When I attempt to open any InDesign files over the network from one machine to the other I get the following message. "Cannot open the document "xxxxxxx". You m
-
Hi!! i have developed a form both in Oracle 3.0.7 and 3.0.8 and in this last the same form the display time is more high than in the previous version. It needs at least 20 seconds to display the form. And the machine in with i have the new version is